Reset the sound subsystem if the audio backend is changed. Fixed an array out of bounds error in the sound device selection.
This commit is contained in:
parent
c39716f183
commit
a79f006cf4
|
@ -2462,6 +2462,7 @@ EVT_HANDLER_MASK(SoundConfigure, "Sound options...", CMDEN_NREC_ANY)
|
||||||
|
|
||||||
soundSetVolume((float)gopts.sound_vol / 100.0);
|
soundSetVolume((float)gopts.sound_vol / 100.0);
|
||||||
update_opts();
|
update_opts();
|
||||||
|
soundReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
EVT_HANDLER(EmulatorDirectories, "Directories...")
|
EVT_HANDLER(EmulatorDirectories, "Directories...")
|
||||||
|
|
|
@ -1704,7 +1704,7 @@ public:
|
||||||
SoundConfig_t &sch = sound_config_handler;
|
SoundConfig_t &sch = sound_config_handler;
|
||||||
int devs = sch.dev->GetSelection();
|
int devs = sch.dev->GetSelection();
|
||||||
|
|
||||||
if (!devs)
|
if (devs <= 0)
|
||||||
gopts.audio_dev = wxEmptyString;
|
gopts.audio_dev = wxEmptyString;
|
||||||
else
|
else
|
||||||
gopts.audio_dev = sch.dev_ids[devs - 1];
|
gopts.audio_dev = sch.dev_ids[devs - 1];
|
||||||
|
|
Loading…
Reference in New Issue