From 5ea6c60eee6a47429c8e9263005baea7f7154aeb Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Sat, 28 Jun 2008 15:32:06 +0000 Subject: [PATCH] Do not initialize music sound system when --nosound option given. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5343 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/sound/cdaudio.c | 2 +- src/init.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/sound/cdaudio.c b/lib/sound/cdaudio.c index 7d1708ee6..9bf623b98 100644 --- a/lib/sound/cdaudio.c +++ b/lib/sound/cdaudio.c @@ -32,7 +32,7 @@ static const size_t bufferSize = 16 * 1024; static const unsigned int buffer_count = 32; -static bool music_initialized; +static bool music_initialized = false; static float music_volume = 0.5; static bool stopping = true; diff --git a/src/init.c b/src/init.c index 9f3eb0c22..ac83ab5c6 100644 --- a/src/init.c +++ b/src/init.c @@ -408,16 +408,17 @@ BOOL systemInitialise(void) if ( war_getSoundEnabled() ) { - if( !audio_Init(droidAudioTrackStopped) ) - debug( LOG_SOUND, "Couldn't initialise audio system: continuing without audio\n" ); + if (!audio_Init(droidAudioTrackStopped)) + { + debug(LOG_SOUND, "Could not initialise audio system: Continuing without audio"); + } + cdAudio_Open(UserMusicPath); } else { - debug( LOG_SOUND, "Sound disabled!" ); + debug(LOG_SOUND, "Sound disabled"); } - cdAudio_Open(UserMusicPath); - if (!dataInitLoadFuncs()) // Pass all the data loading functions to the framework library { return false;