Sound - one spite, 3 sound states

BlitzMax Forums/BlitzMax Beginners Area/Sound - one spite, 3 sound states

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.

I limit my game to 32 channels at the moment, but I increased this from 16 channels trying to figure out a sound problem I was having (which, like you, was down to complete misunderstanding of the Blitzmax sound/channel commands). :)

Basically I have an array of 32 tChannels, plus a channel pointer that counts from 0-31 then loops over. I check if a sound is already playing on that channel. If it is, I stop the channel before playing a new sound on the same channel.

This ensures I'm never trying to play more than 32 channels at once.