From a11e390d7eea1cdbe0b7fdd3c3fc55ff70ceec89 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 7 Sep 2023 19:00:31 -0500 Subject: [PATCH] fix sample center rate loading --- src/engine/fileOpsSample.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/engine/fileOpsSample.cpp b/src/engine/fileOpsSample.cpp index ac9441adc..1fb503543 100644 --- a/src/engine/fileOpsSample.cpp +++ b/src/engine/fileOpsSample.cpp @@ -274,10 +274,13 @@ DivSample* DivEngine::sampleFromFile(const char* path) { { // There's no documentation on libsndfile detune range, but the code // implies -50..50. Yet when loading a file you can get a >50 value. + // disabled for now + /* if(inst.detune > 50) inst.detune = inst.detune - 100; short pitch = ((0x3c-inst.basenote)*100) + inst.detune; sample->centerRate=si.samplerate*pow(2.0,pitch/(12.0 * 100.0)); + */ if(inst.loop_count && inst.loops[0].mode >= SF_LOOP_FORWARD) { sample->loop=true;