-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
When muting, fading sounds are not muted when using webAudio #666
Comments
This issue is because howler use the same node for fading and muting. So when we mute and unmute during volume fade, it cannot restore the incomplete fade. One suggestion would be have a separate gain node to control global volume, and another gain node for fading. Ref: |
calling global mute |
Also faced with this bug. Yeah, global mute works but this is not an option for me. @soruly Do you see any pitfalls when using |
Found that using html5 audio is bad approach, because sounds that were not caused by user action in mobile browser (tap for example) will not play. What I see in console of chrome for android:
There are no such errors when using WebAudio, so it is the only correct approach in modern browsers. And also in Firefox (55.0.2, ubuntu 16.04) looped sound has some delay between replays |
when webAudio is used, it only checks if howler is muted before fade starts. It doesn't check if it is muted while fading (which is handled by linearRampToValueAtTime ). It seems that howler does not disconnect nodes correctly when muting?
The above code doesn't play any sound on HTML5 audio (correct)
But when webAudio is used, the fade in still plays
Ref: (howler v2.0.2)
https://github.com/goldfire/howler.js/blob/v2.0.2/src/howler.core.js#L1109
The workaround is to set {usingWebAudio: false} in global options.
It works well with HTML5 audio.
The text was updated successfully, but these errors were encountered: