ChannelPlaying bug!

BlitzPlus Forums/BlitzPlus Programming/ChannelPlaying bug!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Ah, now the problem is obvious, you're not using the command correctly.

This is how it should be (as MrSAK showed earlier):
Graphics(640,480,0,2)
SetBuffer BackBuffer()

snd=LoadSound("zic.mp3")
chan=PlaySound(snd)   ; <<<< You have to assign the Playsound to a channel variable

While Not KeyHit(1)
	Cls
	Text 0,0,ChannelPlaying(chan)   ; <<<< now you check the channel variable (not the snd)
	Flip
Wend

It's a bit confusing at first, but once you play around with it everything becomes clear.

Note: I've used 'chan' here but it can be anything you like... chan, channel, chan_snd

Hope this helps :)