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.
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.