forums

TNT Basic Forums > Feedback
suggestion for sound playing
< Last Thread     Next Thread >
Author
Thread        Post A Reply

07-24-2004 18:19

Posted by:
JW

Location:
Netherlands

Click Here to Email JW   Find more posts by JW

Well since Mark is back again, it makes sense to give some feedback
again..

If there is an update coming.. it might be a good idea to make a statement
allowing a sound (currently playing) to abort and play one with a higher prioriry or switching it off and don't allow breaking sounds up.

If there are a lot of sound playing some get interrupt and just stops to play another one.. This sounds so bad..!

It might be a small think..

JW

07-25-2004 08:24

Posted by:
charlie

Location:
norfolk, england

Click Here to Email charlie   Find more posts by charlie

how about having more sound channels?

cheers
charlie

07-26-2004 06:23

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Hm? You mean the "stop sound" command?

07-27-2004 20:23

Posted by:
JW

Location:
Netherlands

Click Here to Email JW   Find more posts by JW

No, the sound stops by itself when another sound is played (when there are more then 4 sounds). So a sound gets suddenly interrupted and just stops
to play anothter.. That's not nice..

JW

07-27-2004 22:40

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

I know your problem: in Radical Rebound, when your ship is destroyed, it makes a great burst, much louder than the rest, (for climax ;-P): some times it is interrupted abruptly by something else happening...

I did not bother, but I suppose you can solve the problem by yourself using something as "if not sound playing 3 then play sound 5" this way sound 3 will never be interrupted by 5. Of course you must do something a bit more complex in order to check that already 4 sounds are being played ecc. but it should be possible, though it might be challenging...

There is always a workaround in programming...

07-27-2004 22:44

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Oh, if you order the sound numbers in priority order and use the stop sound command it should not be hard...

You just need to have a variable that keeps track of how many sounds are being played, then if it's 4 and you need to play a sound, you just stop the sound with lowest priority one instant before.

07-30-2004 23:24

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

TNT Basic already does this for you, just pass the priority of the sound when you start it playing:

http://www.tntbasic.com/learn/help/commands/playsound.htm

Play Sound sound,balance,volume,priority

...priority be any number between 0 and 65535. TNT Basic can only play 4 sounds at any one time. The higher the priority of a sound, the more likely it will be get played. This is because it will be able to override lower priority sounds (i.e. the lower priority sound will be stopped and this will be played instead.)...

Hope this helps,

Mark

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.