Trouble with sound

Blitz3D Forums/Blitz3D Programming/Trouble with sound

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.

Personally I wouldn't handle the channels myself, I would let Blitz do that job. Just play the sounds and store the channel as long as it is required.

boom=PlaySound(line_snd)
ChannelPitch boom,40000
; won't be used anymore, so let's forget about it

if a sound is looped, store it's channel in a permanent global variable, such as "music_channel" or something.

Most Soundcards have 16 or 32 Channels, so it happens rarely that there aren't enough channels.