Skip to content

Commit

Permalink
Merge pull request #639 from Lgt2x/audio-messages
Browse files Browse the repository at this point in the history
Do no try opening audio streams when the '-nosound' option is specified
  • Loading branch information
winterheart authored Oct 27, 2024
2 parents 496b2ed + a8e88b6 commit 73d2764
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Descent3/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions editor/gameeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion music/sequencer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ void OutrageMusicSeq::ExecScript(music_stream *strm) {

// 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;
}
Expand Down

0 comments on commit 73d2764

Please sign in to comment.