ref: 54fd320a874cabeaf15115432bfdd172d88e0551
parent: 0446a1adad55886093c25bcdf714fd339c5ddcc9
author: Fabian Greffrath <[email protected]>
date: Wed Mar 13 04:51:25 EDT 2019
sound: Initialize SDL_Mixer for digital/MIDI music playback This will lead to Mix_GetMusicDecoder() actually returning the avaiable music backends and thus get midiproc back to working again. Fixes #1147
--- a/src/i_musicpack.c
+++ b/src/i_musicpack.c
@@ -1148,6 +1148,9 @@
music_initialized = true;
}
+ // Initialize SDL_Mixer for digital music playback
+ Mix_Init(MIX_INIT_FLAC | MIX_INIT_OGG | MIX_INIT_MP3);
+
// Register an effect function to track the music position.
Mix_RegisterEffect(MIX_CHANNEL_POST, TrackPositionCallback, NULL, NULL);
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -194,6 +194,9 @@
}
}
+ // Initialize SDL_Mixer for MIDI music playback
+ Mix_Init(MIX_INIT_MID);
+
// Once initialization is complete, the temporary Timidity config
// file can be removed.