Hi
I've written some code that checks if a sound channel's position is 0 or at the end of the sound file so that I can tell if the channel is playing or stopped, but wondered if I'd missed something easier? Is there anything like SoundChannel:isPlaying() or SoundChannel:isActive() that would simply return whether it is playing or not as true or false?
Thanks, Pete
Comments
Some of the things I do give spoken feedback and, if a user touches the thing that triggers the feedback a second time whilst the feedback is still playing from their first touch, I don't want a second instance of the sound file to play over the first one. So the complete listener doesn't do it for me in that case as I know the sound won't have finished!
It's no great problem as I'm just getting the current channel position and checking if it is somewhere between 0 and the sound file's length and that tells me if it's playing or not. But an isPlaying() function would be handy.
As ever, thanks for the quick and helpful reply.
Pete