The SDK includes a number of useful tools to affect all objects of a certain kind, like gfx.sprite.removeAll()
and gfx.animation.blinker.stopAll()
.
Is there anything similar for sounds? You can hack together your own with playdate.sound.playingSources()
, I think, but is there really not a built-in method?
My current approach.
local soundTable = playdate.sound.playingSources()
for i=1, #soundTable do
soundTable[i]:stop()
end