Merge pull request #639 from Lgt2x/audio-messages

Do no try opening audio streams when the '-nosound' option is specified
This commit is contained in:
Azamat H. Hackimov 2024-10-27 12:52:39 +03:00 committed by GitHub
commit 73d2764573
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View File

@ -1912,7 +1912,7 @@ void InitD3Systems2(bool editor) {
// the remaining sound system
InitVoices();
InitD3Music(FindArg("-nomusic") ? false : true);
InitD3Music(FindArg("-nomusic") || FindArg("-nosound") ? false : true);
InitAmbientSoundSystem();
InitGameSystems(editor);

View File

@ -886,7 +886,7 @@ void InitEditGameSystems() {
ddio_MouseMode(MOUSE_EXCLUSIVE_MODE);
// Sound initialization
InitD3Music(FindArg("-nomusic") ? false : true);
InitD3Music(FindArg("-nomusic") || FindArg("-nosound") ? false : true);
Sound_system.InitSoundLib(Descent, Sound_mixer, Sound_quality, false);
// UI init.
@ -925,7 +925,7 @@ void InitGameEditSystems() {
ddio_MouseMode(MOUSE_STANDARD_MODE);
// Sound initialization for editor
InitD3Music(FindArg("-nomusic") ? false : true);
InitD3Music(FindArg("-nomusic") || FindArg("-nosound") ? false : true);
Sound_system.InitSoundLib(Descent, Sound_mixer, Sound_quality, false);
NewUIClose();

View File

@ -395,7 +395,6 @@ next_ins:
// skip instructions until error is cleared.
if (!err) {
// mprintf(0, "MUSIC: Error opening stream %s on channel %d.\n", name, m_dominant_strm);
LOG_WARNING.printf("Error opening stream %s on channel %d.", name, m_dominant_strm);
strm->error = true;
}