diff --git a/src/engine/engine.h b/src/engine/engine.h index 59dbe1f79..14bfd0db2 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -52,9 +52,9 @@ class DivWorkPool; #define EXTERN_BUSY_BEGIN_SOFT e->softLocked=true; e->isBusy.lock(); #define EXTERN_BUSY_END e->isBusy.unlock(); e->softLocked=false; -//#define DIV_UNSTABLE +#define DIV_UNSTABLE -#define DIV_VERSION "0.6.2" +#define DIV_VERSION "dev197" #define DIV_ENGINE_VERSION 197 // for imports #define DIV_VERSION_MOD 0xff01 diff --git a/src/engine/sample.cpp b/src/engine/sample.cpp index eca9da9cd..719344157 100644 --- a/src/engine/sample.cpp +++ b/src/engine/sample.cpp @@ -807,8 +807,8 @@ bool DivSample::insert(unsigned int pos, unsigned int length) { return false; } -void DivSample::convert(DivSampleDepth newDepth) { - render(); +void DivSample::convert(DivSampleDepth newDepth, unsigned int formatMask) { + render(formatMask|(1U<>3)>9; if (next>accum) { diff --git a/src/engine/sample.h b/src/engine/sample.h index cd4175e9d..dda4b732b 100644 --- a/src/engine/sample.h +++ b/src/engine/sample.h @@ -288,7 +288,7 @@ struct DivSample { * @warning do not attempt to do this outside of a synchronized block! * @param newDepth the new depth. */ - void convert(DivSampleDepth newDepth); + void convert(DivSampleDepth newDepth, unsigned int formatMask=0xffffffff); /** * initialize the rest of sample formats for this sample. diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index a3c70b820..6440ebf55 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -498,7 +498,7 @@ void FurnaceGUI::drawSampleEdit() { if (ImGui::Selectable(sampleDepths[i])) { sample->prepareUndo(true); e->lockEngine([this,sample,i]() { - sample->convert((DivSampleDepth)i); + sample->convert((DivSampleDepth)i,e->getSampleFormatMask()); e->renderSamples(curSample); }); updateSampleTex=true;