how do you stop a sequence of sounds created with the Sound command?
#19
(08-05-2022, 06:11 PM)bplus Wrote: Really, why couldn't you check for user keypresses or mouse-clicks before releasing next sound, piece of cake compared to writing code for User Defined Functions for an Esoteric Interpreter.

Alas this doesn't apply in the situation it came out of. 
Some action happens, like an alien flies across the screen, making some crazy sound created with fancy SOUND statements, and then it flies off the screen. But the sound keeps playing... 
The game action continues, other sounds are happening, the user is still pressing keys. 
Why must we still hear that alien? 

We can use _sndPlay which does not have this problem. 
But to get sounds that are made up on the fly - for example if we want the pitch to be based off some in-game logic or state, we either need to have created the sound files for each pitch ahead of time, or use _sndRaw or create a WAV file on the fly. Not so easy! 

I do plan on learning more about those methods BTW! If I figure it out, then maybe I can create some commands to make this kind of control easier for a less technical programmer (starting with myself! lol)
Reply


Messages In This Thread
RE: how do you stop a sequence of sounds created with the Sound command? - by madscijr - 08-05-2022, 07:50 PM



Users browsing this thread: 9 Guest(s)