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

Fade only stops when target volume has at most 2 decimal places #696

Closed
MatejKafka opened this issue Jan 30, 2017 · 0 comments
Closed

Fade only stops when target volume has at most 2 decimal places #696

MatejKafka opened this issue Jan 30, 2017 · 0 comments

Comments

@MatejKafka
Copy link

When fade gets provided with target volume that has over 2 decimal places (e.g. 0.158,...), it continues to rise indefinitely - eventually, it clips either at 0 or 1.

This is caused by using 0.01 update step and not checking if target volume was passed.

Solution: change https://github.com/goldfire/howler.js/blob/master/src/howler.core.js#L1138 to if (vol > to) { and add howl.volume(to, id) (to set the precise value as expected).

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