TinySound icon indicating copy to clipboard operation
TinySound copied to clipboard

[Request]setVolume for Sound

Open G0dC0der opened this issue 10 years ago • 3 comments

setVolume for Sound is a useful feature that save us coding.

I have actually added this myself to a modified TinySound, but I prefer to use the original one.

G0dC0der avatar Mar 29 '14 22:03 G0dC0der

I had deliberately tried to keep state out of the Sound interface since any single sound can be played multiple times simultaneously. To allow playing a Sound at different volumes, I overloaded the play() method to include one that allows the caller to specify the volume. Are you aware of that functionality? It sounds like that should accomplish what you want.

finnkuusisto avatar Mar 30 '14 17:03 finnkuusisto

Yes I am aware of that method.

There are functions that alter the volume of a sound without playing them(for future use).

I will try to show you a constructive example tomorrow.

G0dC0der avatar Mar 30 '14 23:03 G0dC0der

Sorry, been busy. Will try to show an example later on this week.

G0dC0der avatar Apr 07 '14 19:04 G0dC0der