diff options
author | Simon Howard | 2014-03-23 21:43:12 -0400 |
---|---|---|
committer | Simon Howard | 2014-03-23 21:43:12 -0400 |
commit | da6a260461920d4cafd4c6d1d624aebf2d9b975c (patch) | |
tree | a98c65d365f46b65377566735306d5a82e391819 /src/heretic | |
parent | 84f136b51e07b4d9815c6b033e897ebaef4f16a7 (diff) | |
download | chocolate-doom-da6a260461920d4cafd4c6d1d624aebf2d9b975c.tar.gz chocolate-doom-da6a260461920d4cafd4c6d1d624aebf2d9b975c.tar.bz2 chocolate-doom-da6a260461920d4cafd4c6d1d624aebf2d9b975c.zip |
Rearrange order of SDL sound startup.
Initialize low-level sound startup (calls to I_InitSound) separately
from the high-level sound startup (S_Init). In particular, make sure
that SDL sound is initialized before the textscreen multiplayer
waiting screen is shown. This is an attempt to fix a bug with sound in
multiplayer games on Windows; calling SDL_QuitSubSystem(SDL_INIT_VIDEO)
(on closedown of the textscreen library) causes subsequent attempts to
initialize audio to fail.
Big thanks go to Alexandre-Xavier (AXDOOMER) for working out a fix for
this bug and James Haley (Quasar) for giving some technical background
about the lack of separation between SDL subsystems. This (hopefully)
fixes #270.
Diffstat (limited to 'src/heretic')
-rw-r--r-- | src/heretic/d_main.c | 5 | ||||
-rw-r--r-- | src/heretic/s_sound.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c index 6af7dda1..178db2eb 100644 --- a/src/heretic/d_main.c +++ b/src/heretic/d_main.c @@ -1037,12 +1037,15 @@ void D_DoomMain(void) testcontrols = true; } + I_InitTimer(); + I_InitSound(false); + I_InitMusic(); + #ifdef FEATURE_MULTIPLAYER tprintf("NET_Init: Init network subsystem.\n", 1); NET_Init (); #endif - I_InitTimer(); D_ConnectNetGame(); // haleyjd: removed WATCOMC diff --git a/src/heretic/s_sound.c b/src/heretic/s_sound.c index 755206b4..79e2d353 100644 --- a/src/heretic/s_sound.c +++ b/src/heretic/s_sound.c @@ -523,7 +523,6 @@ void S_UpdateSounds(mobj_t * listener) void S_Init(void) { soundCurve = Z_Malloc(MAX_SND_DIST, PU_STATIC, NULL); - I_InitSound(false); if (snd_Channels > 8) { snd_Channels = 8; |