TinySound icon indicating copy to clipboard operation
TinySound copied to clipboard

Limit for Sound

Open G0dC0der opened this issue 10 years ago • 0 comments

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.

G0dC0der avatar Oct 06 '14 23:10 G0dC0der