re-initialize dispatch if core settings changed
This commit is contained in:
parent
7732031404
commit
332c6edbed
|
@ -3916,9 +3916,13 @@ void DivEngine::setConsoleMode(bool enable) {
|
||||||
consoleMode=enable;
|
consoleMode=enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivEngine::switchMaster() {
|
bool DivEngine::switchMaster(bool full) {
|
||||||
logI("switching output...");
|
logI("switching output...");
|
||||||
deinitAudioBackend(true);
|
deinitAudioBackend(true);
|
||||||
|
if (full) {
|
||||||
|
quitDispatch();
|
||||||
|
initDispatch();
|
||||||
|
}
|
||||||
if (initAudioBackend()) {
|
if (initAudioBackend()) {
|
||||||
for (int i=0; i<song.systemLen; i++) {
|
for (int i=0; i<song.systemLen; i++) {
|
||||||
disCont[i].setRates(got.rate);
|
disCont[i].setRates(got.rate);
|
||||||
|
|
|
@ -976,7 +976,7 @@ class DivEngine {
|
||||||
String getPlaybackDebugInfo();
|
String getPlaybackDebugInfo();
|
||||||
|
|
||||||
// switch master
|
// switch master
|
||||||
bool switchMaster();
|
bool switchMaster(bool full=false);
|
||||||
|
|
||||||
// set MIDI base channel
|
// set MIDI base channel
|
||||||
void setMidiBaseChan(int chan);
|
void setMidiBaseChan(int chan);
|
||||||
|
|
|
@ -2594,6 +2594,15 @@ void FurnaceGUI::commitSettings() {
|
||||||
settings.tg100Path!=e->getConfString("tg100Path","") ||
|
settings.tg100Path!=e->getConfString("tg100Path","") ||
|
||||||
settings.mu5Path!=e->getConfString("mu5Path","");
|
settings.mu5Path!=e->getConfString("mu5Path","");
|
||||||
|
|
||||||
|
bool coresChanged=(
|
||||||
|
settings.arcadeCore!=e->getConfInt("arcadeCore",0) ||
|
||||||
|
settings.ym2612Core!=e->getConfInt("ym2612Core",0) ||
|
||||||
|
settings.snCore!=e->getConfInt("snCore",0) ||
|
||||||
|
settings.nesCore!=e->getConfInt("nesCore",0) ||
|
||||||
|
settings.fdsCore!=e->getConfInt("fdsCore",0) ||
|
||||||
|
settings.c64Core!=e->getConfInt("c64Core",1)
|
||||||
|
);
|
||||||
|
|
||||||
e->setConf("mainFontSize",settings.mainFontSize);
|
e->setConf("mainFontSize",settings.mainFontSize);
|
||||||
e->setConf("patFontSize",settings.patFontSize);
|
e->setConf("patFontSize",settings.patFontSize);
|
||||||
e->setConf("iconSize",settings.iconSize);
|
e->setConf("iconSize",settings.iconSize);
|
||||||
|
@ -2754,7 +2763,7 @@ void FurnaceGUI::commitSettings() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!e->switchMaster()) {
|
if (!e->switchMaster(coresChanged)) {
|
||||||
showError("could not initialize audio!");
|
showError("could not initialize audio!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue