TinySound
TinySound copied to clipboard
Limit for Sound
I think Sound should have a limit, which define the maximum number of times a sound can active at once(default is infinite).
So, I have a sound instance called magicSound which plays a 3 second sound:
magicSound.setLimit(2);
If I do:
magicSound.play(); magicSound.play(); magicSound.play();
The third call will be ignored since two are already playing.