]> git.0x19.co - doomgeneric-snom360/commitdiff
DG_sound_module
authorozkl <ozkl@users.noreply.github.com>
Wed, 11 Jan 2023 21:31:21 +0000 (00:31 +0300)
committerozkl <ozkl@users.noreply.github.com>
Wed, 11 Jan 2023 21:31:21 +0000 (00:31 +0300)
doomgeneric/i_sdlmusic.c
doomgeneric/i_sdlsound.c
doomgeneric/i_sound.c

index c2101b70fa8fd0f1f696d3ebb72b418c5291644c..bac6f5b21eabbff2f612faa32ba9a1fc39d3747e 100644 (file)
@@ -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),
index e85e2fc6fbe0a6d02d3120da14397acaba1f16e9..aa38ed42386f310ebb2eb385e87aed844d165f52 100644 (file)
@@ -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),
index 9fd314b5c5652a7c13e4308af62c0cf208dbb6b9..b4c73a18b2c921307176f832fa9b6e8b39f97bfe 100644 (file)
@@ -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;
-            }
-        }
-    }*/
 }
 
 //