diff --git a/src/engine/dispatchContainer.cpp b/src/engine/dispatchContainer.cpp index f7f22973e..e885dbbb6 100644 --- a/src/engine/dispatchContainer.cpp +++ b/src/engine/dispatchContainer.cpp @@ -88,7 +88,7 @@ void DivDispatchContainer::clear() { prevSample[1]=temp[1];*/ } -void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, double gotRate, bool pal) { +void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, double gotRate, unsigned int flags) { if (dispatch!=NULL) return; bb[0]=blip_new(32768); @@ -170,7 +170,7 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do dispatch=new DivPlatformDummy; break; } - dispatch->init(eng,chanCount,gotRate,pal); + dispatch->init(eng,chanCount,gotRate,flags); } void DivDispatchContainer::quit() { diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 987353998..bd18bfb79 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -5993,6 +5993,7 @@ bool DivEngine::initAudioBackend() { } lowQuality=getConfInt("audioQuality",0); + forceMono=getConfInt("forceMono",0); switch (audioEngine) { case DIV_AUDIO_JACK: diff --git a/src/engine/engine.h b/src/engine/engine.h index fd5fe8e9b..618e0e4d4 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -116,7 +116,7 @@ struct DivDispatchContainer { void acquire(size_t offset, size_t count); void fillBuf(size_t runtotal, size_t size); void clear(); - void init(DivSystem sys, DivEngine* eng, int chanCount, double gotRate, bool pal); + void init(DivSystem sys, DivEngine* eng, int chanCount, double gotRate, unsigned int flags); void quit(); DivDispatchContainer(): dispatch(NULL), @@ -148,6 +148,7 @@ class DivEngine { bool metronome; bool exporting; bool halted; + bool forceMono; int ticks, curRow, curOrder, remainingLoops, nextSpeed, divider; int cycles, clockDrift; int changeOrd, changePos, totalSeconds, totalTicks, totalTicksR, totalCmds, lastCmds, cmdsPerSecond, globalPitch; @@ -568,6 +569,7 @@ class DivEngine { metronome(false), exporting(false), halted(false), + forceMono(false), ticks(0), curRow(0), curOrder(0), diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index 58c6f8f05..6d334f4d7 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -1192,5 +1192,12 @@ void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsi memcpy(oscBuf[0],out[0],size*sizeof(float)); memcpy(oscBuf[1],out[1],size*sizeof(float)); oscSize=size; + + if (forceMono) { + for (size_t i=0; igetConfInt("stepOnDelete",0); settings.scrollStep=e->getConfInt("scrollStep",0); settings.sysSeparators=e->getConfInt("sysSeparators",1); + settings.forceMono=e->getConfInt("forceMono",0); } #define PUT_UI_COLOR(source) e->setConf(#source,(int)ImGui::GetColorU32(uiColors[source])); @@ -3227,6 +3233,7 @@ void FurnaceGUI::commitSettings() { e->setConf("stepOnDelete",settings.stepOnDelete); e->setConf("scrollStep",settings.scrollStep); e->setConf("sysSeparators",settings.sysSeparators); + e->setConf("forceMono",settings.forceMono); PUT_UI_COLOR(GUI_COLOR_BACKGROUND); PUT_UI_COLOR(GUI_COLOR_FRAME_BACKGROUND); diff --git a/src/gui/gui.h b/src/gui/gui.h index d30278a49..0d2547474 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -217,6 +217,7 @@ class FurnaceGUI { int stepOnDelete; int scrollStep; int sysSeparators; + int forceMono; unsigned int maxUndoSteps; String mainFontPath; String patFontPath; @@ -249,6 +250,7 @@ class FurnaceGUI { stepOnDelete(0), scrollStep(0), sysSeparators(1), + forceMono(0), maxUndoSteps(100), mainFontPath(""), patFontPath("") {}