@@ -464,10 +464,15 @@ void OnComboGraphicsMode(CShellWindow* pWnd, InterfaceEventCode code, int param)
464
464
}
465
465
466
466
// sound
467
- static SpeechPlayer* OptionSamplePlayer = new SpeechPlayer() ;
467
+ static SpeechPlayer* OptionSamplePlayer = nullptr ;
468
468
469
469
bool OptionPlaySample (GLOBAL_VOLUME global_volume, float volume, const char * path) {
470
470
bool started = false ;
471
+ if (!OptionSamplePlayer) {
472
+ OptionSamplePlayer = new SpeechPlayer ();
473
+ // Avoid overlapping any running speech audios
474
+ OptionSamplePlayer->channel_group = SND_GROUP_EFFECTS;
475
+ }
471
476
if (OptionSamplePlayer->GetVolumeSelection () != global_volume) {
472
477
OptionSamplePlayer->Stop ();
473
478
}
@@ -502,16 +507,14 @@ void OnSliderSpeechVolume(CShellWindow* pWnd, InterfaceEventCode code, int param
502
507
CSliderWindow *pSlider = (CSliderWindow*) pWnd;
503
508
if ( code == EVENT_CREATEWND ) {
504
509
pSlider->pos = terSpeechVolume;
505
- historyScene.setupAudio ();
506
- _shellIconManager.setupAudio ();
507
510
} else if ((code == EVENT_SLIDERUPDATE && pSlider->pos != terSpeechVolume) || code == EVENT_UNPRESSED) {
508
511
terSpeechVolume = pSlider->pos ;
509
512
if (code == EVENT_UNPRESSED) {
510
- historyScene.setupAudio ();
511
513
_shellIconManager.setupAudio ();
512
514
}
513
515
std::string path = getLocDataPath ();
514
516
static int i = 0 ;
517
+ // Avoid using briefing audios in GW since different languages may have different filenames
515
518
// Select ET audio if only ET is selected
516
519
bool et = terGameContentSelect == PERIMETER_ET;
517
520
if (1 < i) i = 0 ;
0 commit comments