You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @ogbabydiesal! I'd love to work on implementing the playMode() method for SoundFile by managing internal Tone.Player instances. Could you please assign this issue to me?
Hey @sadSanta-07 good work, this is close. i noticed however that the pause method is now broken. in fact it made me realize some weird behavior with pause() in general that I need to address (when the soundfile isn't looping, isPlaying() never returns to false when the soundfile ends - but thats a whole other bug).
can you take a look at why your pause() method doesn't work?
The issue was that setting playbackRate = 0 on pause kept the Tone.Player in a "started" state indefinitely. Because it never naturally stopped, the onstop garbage collection callback never fired, keeping isPlaying() stuck on true and filling up the active players array.
I've pushed an updated commit that fixes this:
Fixed pause() and play(): pause() now properly stops the players and saves the exact offset time using the Web Audio context clock. play() checks for this offset and resumes cleanly without overlapping audio.
Fixed isPlaying(): Because the players are fully stopped on pause (and when they finish), the garbage collection runs properly and isPlaying() accurately returns to false.
Fixed onended: Added an internal _isStopping flag so manual pauses/stops don't trigger the user's onended callback prematurely; it now only fires on a natural finish.
Activity
sadSanta-07 commentedon Oct 2, 2026
Hi @ogbabydiesal! I'd love to work on implementing the playMode() method for SoundFile by managing internal Tone.Player instances. Could you please assign this issue to me?
ogbabydiesal commentedon Oct 16, 2026
Hey @sadSanta-07 good work, this is close. i noticed however that the pause method is now broken. in fact it made me realize some weird behavior with pause() in general that I need to address (when the soundfile isn't looping, isPlaying() never returns to false when the soundfile ends - but thats a whole other bug).
can you take a look at why your pause() method doesn't work?
sadSanta-07 commentedon Oct 17, 2026
Hi @ogbabydiesal! you were completely right.
The issue was that setting playbackRate = 0 on pause kept the Tone.Player in a "started" state indefinitely. Because it never naturally stopped, the onstop garbage collection callback never fired, keeping isPlaying() stuck on true and filling up the active players array.
I've pushed an updated commit that fixes this:
Fixed pause() and play(): pause() now properly stops the players and saves the exact offset time using the Web Audio context clock. play() checks for this offset and resumes cleanly without overlapping audio.
Fixed isPlaying(): Because the players are fully stopped on pause (and when they finish), the garbage collection runs properly and isPlaying() accurately returns to false.
Fixed onended: Added an internal _isStopping flag so manual pauses/stops don't trigger the user's onended callback prematurely; it now only fires on a natural finish.
Let me know if everything looks good to go now!