[Buildroot] [PATCH 1/2] sdl_mixer: add FluidSynth support

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sun Jul 12 19:06:13 UTC 2020


On Sun, 12 Jul 2020 19:39:36 +0200
Paul Cercueil <paul at crapouillou.net> wrote:

> > I've applied both patches, but I've changed a bit how the .mk file
> > handles the option. After both patches, it looks like this:
> > 
> > ifeq ($(BR2_PACKAGE_FLUIDSYNTH),y)
> > SDL_MIXER_DEPENDENCIES += fluidsynth
> > SDL_MIXER_CONF_OPTS += \
> > 	--enable-music-midi \
> > 	--enable-music-fluidsynth-midi
> > SDL_MIXER_HAS_MIDI = YES
> > endif
> > 
> > ifeq ($(BR2_PACKAGE_SDL_MIXER_MIDI_TIMIDITY),y)
> > SDL_MIXER_CONF_OPTS += \
> > 	--enable-music-midi \
> > 	--enable-music-timidity-midi
> > SDL_MIXER_HAS_MIDI = YES
> > endif
> > 
> > ifneq ($(SDL_MIXER_HAS_MIDI),YES)
> > SDL_MIXER_CONF_OPTS += --disable-music-midi
> > endif  
> 
> It won't work then. --enable-music-midi automatically enables 
> --enable-music-{native,fluidsynth,timidity}-midi, so these need to be 
> manually disabled. Otherwise when you enable e.g. Fluidsynth, it will 
> also enable Timidity even though the SDL_MIXER_MIDI_TIMIDITY option is 
> OFF.

So, I guess we need this instead:

ifeq ($(BR2_PACKAGE_FLUIDSYNTH),y)
SDL_MIXER_DEPENDENCIES += fluidsynth
SDL_MIXER_CONF_OPTS += --enable-music-fluidsynth-midi
SDL_MIXER_HAS_MIDI = YES
else
SDL_MIXER_CONF_OPTS += --disable-music-fluidsynth-midi
endif

ifeq ($(BR2_PACKAGE_SDL_MIXER_MIDI_TIMIDITY),y)
SDL_MIXER_CONF_OPTS += --enable-music-timidity-midi
SDL_MIXER_HAS_MIDI = YES
else
SDL_MIXER_CONF_OPTS += --disable-music-timidity-midi
endif

ifeq ($(SDL_MIXER_HAS_MIDI),YES)
SDL_MIXER_CONF_OPTS += --disable-music-midi
else
SDL_MIXER_CONF_OPTS += --disable-music-midi
endif

what do you think ?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list