I’m triggering an audio.play() event inside a startDrag() method, inside the “ended or cancelled” conditional phase, and specifying a channel, like this-
[lua]releaseSoundplay = audio.play(releaseSound, {channel=8,loop=0})
audio.setVolume( 0.1, { channel=8 } ) – set the volume on channel 8[/lua]
I need to specify channels in order to adjust volumes of individual sounds.
I find that in the simulator, if I trigger startDrag() events in quick succession, I get errors along the following line-
[lua]Warning: audio error: Requested channel (8) is in use[/lua]
I suppose since channel assignment is being set on each phase conditional, this is causing the errors.
My questions are-
Am I correct in this?
If so, is it possible to set the channel outside of the audio.play() event so the startDrag() phase doesn’t trigger the channel assignment each time?
Any other approaches, tips, suggestions to solving this would be greatly appreciated.
Thanks.