Alchemy envelope function bug?
Opened this issue · 1 comments
starburst997 commented
Seems like there is a bug in the function (line 685)
static AS3_Val envelope(void *self, AS3_Val args)
Instead of (line 695)
expandSpline(&modPoint, scratch1, frames); // draws spline segment into scratch1
it should be
expandSpline(&modPoint, scratch1, frames*channels); // draws spline segment into scratch1
A workaround if people don't wan't to compile Alchemy is to change line 535 of "Sample.as" to
Sample._awave.envelope(getSamplePointer(offset), 1 /*_descriptor.channels*/, numFrames * 2, mp);
To trick Alchemy to do the right calculation, otherwise half of the sample don't get the envelope.
starburst997 commented
Also, very good library, I love it! Good work!