I have wrestled with this before and thought it is about time for a topic.
In my (B+) game there are many aliens which you shoot. If several explode at once or very soon after each other I have several options:
a) play every explosion, not stopping any channels, BUT this can result in much too loud noise as many samples play at once.
b) only have one channel and use Stopchannel before each new explosion noise BUT when many explode shortly after each other the stopchannel causes a horrid clicking as the sample cuts and restarts.
c) a hybrid of a and b such as having 3 channels that you rotate and you do you the stop channel method. This is better but there is still a horrid clicking.
d) check to see if the channel is playing and if so, don't start a new explosion noise (bit lame?)
e) write some code to fade a channel in a few millisecs instead of stopping it dead in a hope to avoid the clicking sound. Could be a fag.
f) Try a different sample I suppose to avoid clicking or it being too loud. Could the problem be that I am using an old 8 bit sample? Mind you I have had this problem with other samples that I sure are 16 bit.
How have you done it in your games? Any advice is very welcome, thanks in advance.
On a side note, I noticed that when blitz plays modules, certain tracking techniques cause it to make clicks such as the cut channel (by using caps lock key in FT2). But the mods play fine in the tracker and other tracking utilities. Does this mean that the blitz plus mod player (and sample playing code) is inferior?
In my (B+) game there are many aliens which you shoot. If several explode at once or very soon after each other I have several options:
a) play every explosion, not stopping any channels, BUT this can result in much too loud noise as many samples play at once.
b) only have one channel and use Stopchannel before each new explosion noise BUT when many explode shortly after each other the stopchannel causes a horrid clicking as the sample cuts and restarts.
c) a hybrid of a and b such as having 3 channels that you rotate and you do you the stop channel method. This is better but there is still a horrid clicking.
d) check to see if the channel is playing and if so, don't start a new explosion noise (bit lame?)
e) write some code to fade a channel in a few millisecs instead of stopping it dead in a hope to avoid the clicking sound. Could be a fag.
f) Try a different sample I suppose to avoid clicking or it being too loud. Could the problem be that I am using an old 8 bit sample? Mind you I have had this problem with other samples that I sure are 16 bit.
How have you done it in your games? Any advice is very welcome, thanks in advance.
On a side note, I noticed that when blitz plays modules, certain tracking techniques cause it to make clicks such as the cut channel (by using caps lock key in FT2). But the mods play fine in the tracker and other tracking utilities. Does this mean that the blitz plus mod player (and sample playing code) is inferior?