package/sdl_mixer: add MIDI support using Timidity
authorPaul Cercueil <paul@crapouillou.net>
Thu, 2 Jul 2020 15:25:47 +0000 (17:25 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 12 Jul 2020 13:47:15 +0000 (15:47 +0200)
Add MIDI playback support using SDL_mixer' built-in Timidity synth.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/sdl_mixer/Config.in
package/sdl_mixer/sdl_mixer.mk

index 42dfe63c0a0f077c29e242e5a602bc4dc0b8c1d3..a886b7c1ac9560b4fb8c5263591561340f88d962 100644 (file)
@@ -9,3 +9,13 @@ config BR2_PACKAGE_SDL_MIXER
          SMPEG MP3 libraries.
 
          http://www.libsdl.org/projects/SDL_mixer/
+
+if BR2_PACKAGE_SDL_MIXER
+
+config BR2_PACKAGE_SDL_MIXER_MIDI_TIMIDITY
+       bool "MIDI support with built-in Timidity synth"
+       help
+         Support MIDI audio using the built-in synth based on Timidity.
+         You will need MIDI instruments installed in the filesystem.
+
+endif
index 4cd13de2f6b0f2f219ffd1f11587015d9a1d3e39..9636c228adf6832bfb6e65d96695361b9f1111e6 100644 (file)
@@ -31,9 +31,18 @@ SDL_MIXER_DEPENDENCIES += fluidsynth
 SDL_MIXER_CONF_OPTS += \
        --enable-music-midi \
        --enable-music-fluidsynth-midi
-else
+SDL_MIXER_HAS_MIDI = YES
+endif
+
+ifeq ($(BR2_PACKAGE_SDL_MIXER_MIDI_TIMIDITY),y)
 SDL_MIXER_CONF_OPTS += \
-       --disable-music-midi
+       --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
 
 ifeq ($(BR2_PACKAGE_LIBMAD),y)