TNT Basic Forums > Programming Q&A
About playing sounds
< Last Thread     Next Thread >
Thread        Post A Reply

04-22-2004 10:19

Posted by:


Click Here to Email JW   Find more posts by JW

I was wondering how to handle sounds in tnt basic.
Tntbasic is able of playing 4 sounds at once.
But there are often more sounds to play. Of course you can give some sounds more priority, but then it will suddenly stops other sounds that are playing.

Does anybody have suggestions about handling the sound procedure:

I always want to have
1) player weapon sound
2) hit or/and explosion sounds
3) picking bonusitems, enemy fire
4) other sounds

How can i be sure that there are enough sounds played and that the sounds
will not suddenly stopped (that doesn't sounds good).


04-23-2004 21:58

Posted by:


Find more posts by kemalyun


what you can do to make "more channels available" is to make your sounds shorter, i.e. your own shooting-sound should be only as long as the time between two shots fired, so it will only use one channel, no matter how often you shoot. if you still need a longer shooting-sound, divide it into two sounds: the attack-phase (first part) and the release-phase (the end of the sound). then play only the first part and when another shot is fired, again the first part. only when after a shot is fired and a certain time passed (length of the first sound) without shooting again, play the second sound. understandable? then you have a long shooting sound which still uses only 1 channel. you can do that with other sounds the same way. little bit tricky, but will work.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.