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
master
Per Inge Mathisen 2008-06-28 15:32:06 +00:00
parent a8dc963d37
commit 5ea6c60eee
2 changed files with 7 additions and 6 deletions

View File

@ -32,7 +32,7 @@
static const size_t bufferSize = 16 * 1024; static const size_t bufferSize = 16 * 1024;
static const unsigned int buffer_count = 32; static const unsigned int buffer_count = 32;
static bool music_initialized; static bool music_initialized = false;
static float music_volume = 0.5; static float music_volume = 0.5;
static bool stopping = true; static bool stopping = true;

View File

@ -408,16 +408,17 @@ BOOL systemInitialise(void)
if ( war_getSoundEnabled() ) if ( war_getSoundEnabled() )
{ {
if( !audio_Init(droidAudioTrackStopped) ) if (!audio_Init(droidAudioTrackStopped))
debug( LOG_SOUND, "Couldn't initialise audio system: continuing without audio\n" ); {
debug(LOG_SOUND, "Could not initialise audio system: Continuing without audio");
}
cdAudio_Open(UserMusicPath);
} }
else 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 if (!dataInitLoadFuncs()) // Pass all the data loading functions to the framework library
{ {
return false; return false;