weird, PauseChannel doesn't affect ChannelPlaying

BlitzMax Forums/BlitzMax Programming/weird, PauseChannel doesn't affect ChannelPlaying

Grey Alien(Posted 2007) [#1]
[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.


Dreamora(Posted 2007) [#2]
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.


Damien Sturdy(Posted 2007) [#3]
As Dreamora said.

[edit] what I had typed here was crap, so i just agree with D.


tonyg(Posted 2007) [#4]
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.


Grey Alien(Posted 2007) [#5]
OK I think I was talking out my arse, false alarm, will edit top post.