Skip to content

Commit 1029845

Browse files
ozklCacodemon345
authored andcommitted
DG_sound_module
1 parent b321777 commit 1029845

File tree

3 files changed

+10
-41
lines changed

3 files changed

+10
-41
lines changed

doomgeneric/i_sdlmusic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ static snddevice_t music_sdl_devices[] =
12971297
SNDDEVICE_AWE32,
12981298
};
12991299

1300-
music_module_t music_sdl_module =
1300+
music_module_t DG_music_module =
13011301
{
13021302
music_sdl_devices,
13031303
arrlen(music_sdl_devices),

doomgeneric/i_sdlsound.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ static snddevice_t sound_sdl_devices[] =
10591059
SNDDEVICE_AWE32,
10601060
};
10611061

1062-
sound_module_t sound_sdl_module =
1062+
sound_module_t DG_sound_module =
10631063
{
10641064
sound_sdl_devices,
10651065
arrlen(sound_sdl_devices),

doomgeneric/i_sound.c

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@ char *snd_musiccmd = "";
5454

5555
// Low-level sound and music modules we are using
5656

57-
static sound_module_t *sound_module;
58-
static music_module_t *music_module;
57+
static sound_module_t *sound_module = NULL;
58+
static music_module_t *music_module = NULL;
5959

6060
int snd_musicdevice = SNDDEVICE_SB;
6161
int snd_sfxdevice = SNDDEVICE_SB;
6262

6363
// Sound modules
6464

6565
extern void I_InitTimidityConfig(void);
66-
extern sound_module_t sound_sdl_module;
67-
extern sound_module_t sound_pcsound_module;
6866
#ifdef FEATURE_SOUND
69-
extern music_module_t music_sdl_module;
70-
#endif /* FEATURE_SOUND */
67+
extern sound_module_t* DG_sound_module;
68+
extern music_module_t* DG_music_module;
69+
#endif
70+
extern sound_module_t sound_pcsound_module;
7171
extern music_module_t music_opl_module;
7272

7373
// For OPL module:
@@ -92,17 +92,7 @@ static int snd_mport = 0;
9292
static sound_module_t *sound_modules[] =
9393
{
9494
#ifdef FEATURE_SOUND
95-
&sound_sdl_module,
96-
#endif
97-
NULL,
98-
};
99-
100-
// Compiled-in music modules:
101-
102-
static music_module_t *music_modules[] =
103-
{
104-
#ifdef FEATURE_SOUND
105-
&music_sdl_module,
95+
&DG_sound_module,
10696
#endif
10797
NULL,
10898
};
@@ -158,30 +148,9 @@ static void InitSfxModule(boolean use_sfx_prefix)
158148

159149
static void InitMusicModule(void)
160150
{
161-
int i;
162-
163151
#ifdef FEATURE_SOUND
164-
music_module = &music_sdl_module; return;
152+
music_module = &DG_music_module;
165153
#endif /* FEATURE_SOUND */
166-
167-
/*for (i=0; music_modules[i] != NULL; ++i)
168-
{
169-
// Is the music device in the list of devices supported
170-
// by this module?
171-
172-
if (SndDeviceInList(snd_musicdevice,
173-
music_modules[i]->sound_devices,
174-
music_modules[i]->num_sound_devices))
175-
{
176-
// Initialize the module
177-
178-
if (music_modules[i]->Init())
179-
{
180-
music_module = music_modules[i];
181-
return;
182-
}
183-
}
184-
}*/
185154
}
186155

187156
//

0 commit comments

Comments
 (0)