diff --git a/doomgeneric/i_sdlmusic.c b/doomgeneric/i_sdlmusic.c index c2101b7..bac6f5b 100644 --- a/doomgeneric/i_sdlmusic.c +++ b/doomgeneric/i_sdlmusic.c @@ -1297,7 +1297,7 @@ static snddevice_t music_sdl_devices[] = SNDDEVICE_AWE32, }; -music_module_t music_sdl_module = +music_module_t DG_music_module = { music_sdl_devices, arrlen(music_sdl_devices), diff --git a/doomgeneric/i_sdlsound.c b/doomgeneric/i_sdlsound.c index e85e2fc..aa38ed4 100644 --- a/doomgeneric/i_sdlsound.c +++ b/doomgeneric/i_sdlsound.c @@ -1059,7 +1059,7 @@ static snddevice_t sound_sdl_devices[] = SNDDEVICE_AWE32, }; -sound_module_t sound_sdl_module = +sound_module_t DG_sound_module = { sound_sdl_devices, arrlen(sound_sdl_devices), diff --git a/doomgeneric/i_sound.c b/doomgeneric/i_sound.c index 9fd314b..b4c73a1 100644 --- a/doomgeneric/i_sound.c +++ b/doomgeneric/i_sound.c @@ -54,8 +54,8 @@ char *snd_musiccmd = ""; // Low-level sound and music modules we are using -static sound_module_t *sound_module; -static music_module_t *music_module; +static sound_module_t *sound_module = NULL; +static music_module_t *music_module = NULL; int snd_musicdevice = SNDDEVICE_SB; int snd_sfxdevice = SNDDEVICE_SB; @@ -63,11 +63,11 @@ int snd_sfxdevice = SNDDEVICE_SB; // Sound modules extern void I_InitTimidityConfig(void); -extern sound_module_t sound_sdl_module; -extern sound_module_t sound_pcsound_module; #ifdef FEATURE_SOUND -extern music_module_t music_sdl_module; -#endif /* FEATURE_SOUND */ +extern sound_module_t* DG_sound_module; +extern music_module_t* DG_music_module; +#endif +extern sound_module_t sound_pcsound_module; extern music_module_t music_opl_module; // For OPL module: @@ -92,17 +92,7 @@ static int snd_mport = 0; static sound_module_t *sound_modules[] = { #ifdef FEATURE_SOUND - &sound_sdl_module, - #endif - NULL, -}; - -// Compiled-in music modules: - -static music_module_t *music_modules[] = -{ - #ifdef FEATURE_SOUND - &music_sdl_module, + &DG_sound_module, #endif NULL, }; @@ -158,30 +148,9 @@ static void InitSfxModule(boolean use_sfx_prefix) static void InitMusicModule(void) { - int i; - #ifdef FEATURE_SOUND - music_module = &music_sdl_module; return; + music_module = &DG_music_module; #endif /* FEATURE_SOUND */ - - /*for (i=0; music_modules[i] != NULL; ++i) - { - // Is the music device in the list of devices supported - // by this module? - - if (SndDeviceInList(snd_musicdevice, - music_modules[i]->sound_devices, - music_modules[i]->num_sound_devices)) - { - // Initialize the module - - if (music_modules[i]->Init()) - { - music_module = music_modules[i]; - return; - } - } - }*/ } //