mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 15:03:01 +00:00
fix sample center rate loading
This commit is contained in:
parent
2781f1d2c1
commit
a11e390d7e
1 changed files with 3 additions and 0 deletions
|
@ -274,10 +274,13 @@ DivSample* DivEngine::sampleFromFile(const char* path) {
|
||||||
{
|
{
|
||||||
// There's no documentation on libsndfile detune range, but the code
|
// 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.
|
// implies -50..50. Yet when loading a file you can get a >50 value.
|
||||||
|
// disabled for now
|
||||||
|
/*
|
||||||
if(inst.detune > 50)
|
if(inst.detune > 50)
|
||||||
inst.detune = inst.detune - 100;
|
inst.detune = inst.detune - 100;
|
||||||
short pitch = ((0x3c-inst.basenote)*100) + inst.detune;
|
short pitch = ((0x3c-inst.basenote)*100) + inst.detune;
|
||||||
sample->centerRate=si.samplerate*pow(2.0,pitch/(12.0 * 100.0));
|
sample->centerRate=si.samplerate*pow(2.0,pitch/(12.0 * 100.0));
|
||||||
|
*/
|
||||||
if(inst.loop_count && inst.loops[0].mode >= SF_LOOP_FORWARD)
|
if(inst.loop_count && inst.loops[0].mode >= SF_LOOP_FORWARD)
|
||||||
{
|
{
|
||||||
sample->loop=true;
|
sample->loop=true;
|
||||||
|
|
Loading…
Reference in a new issue