Is it safe to use StopChannel on a non-playing ch?

Monkey Forums/Monkey Programming/Is it safe to use StopChannel on a non-playing ch?

Grey Alien(Posted 2014) [#1]
I normally do this kind thing:
 if ChannelState(i) = 1 Then StopChannel(i)


However, I noticed that ChannelState always returns -1 on Android due to an API limitation, so I'm not doing the safety check any more. Does anyone know if StopChannel on a channel which is not playing bombs out? Thx!

Actually same thing for: SetChannelVolume.

I could construct a test but thought I'd ask first.


programmer(Posted 2014) [#2]
Yes, it's safe. Mojo tracks an internal state of the channel.


Grey Alien(Posted 2014) [#3]
OK cool. Thx.