howler.js icon indicating copy to clipboard operation
howler.js copied to clipboard

Maximum call stack size exceeded after resuming context

Open inear opened this issue 2 years ago • 0 comments

When the context is in suspended mode and a lot of actions are coming in, such as setting volume() or pan() in a game loop it will result in "Uncaught RangeError: Maximum call stack size exceeded"-error once the mode becomes 'running'. I wonder if we can at least replace the latest action by type in the queue instead of trying to replay them all? I mean a volume change don't have to be a serialized chain of actions. But I suspect it's more complicated than that with sound-sprites and internal state etc. It's a nice feature that the actions are applied when the context is resumed so the mix is as expected, but maybe there is a way to avoid the error. Or perhaps splitting up the queue-playback into several frames or something while setting global volume to mute.

inear avatar Dec 21 '21 12:12 inear