weird, PauseChannel doesn't affect ChannelPlaying
BlitzMax Forums/BlitzMax Programming/weird, PauseChannel doesn't affect ChannelPlaying
| ||
[edit] This is not true, I made a mistake, sorry. Just found out that if you allocate a channel, play some music and pause it with PauseChannel, then test it with ChannelPlaying, ChannelPlaying still returns 1! However, when the music finishes (assuming it's not looped) then ChannelPlaying returns 0 which is to be expected. I haven't tested what ChannelPlaying returns on a channel that has been stopped with StopChannel, I'd assume 0 though (and not a crash because StopChannel actually deallocates the channel) I don't actually mind now I know this is the behaviour and in fact if it gets "fixed/altered" it will break my game. Just thought I'd let you all know for future reference. |
| ||
As long as you don't stop a channel it is technically still playing and used. Thats most likely the reason you get a 1 there, even if you pause it, as the channel is still active. |
| ||
As Dreamora said. [edit] what I had typed here was crap, so i just agree with D. |
| ||
The doc suggests it should return '0' but, if I read it correctly, the code returns buf_active from playing() which isn't changed by the pause method.I agree the documentation seems, at least, a bit odd. |
| ||
OK I think I was talking out my arse, false alarm, will edit top post. |