Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alchemy envelope function bug? #29

Open
starburst997 opened this issue May 7, 2013 · 1 comment
Open

Alchemy envelope function bug? #29

starburst997 opened this issue May 7, 2013 · 1 comment

Comments

@starburst997
Copy link

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
Copy link
Author

Also, very good library, I love it! Good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant