Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
neat _SndRaw example, but how do you stop _SndRaw from playing?
#8
Shocked 
Do you guys know anything about Greek/Roman mythology? Have you read "The Oddysey" English translation?

Kidding aside...

The sound has to be faded away after the user presses escape. If you decided to sound longer for three seconds before closing the program, then you have to figure out for three seconds how to make the sound silent. This means make the code just like the regular loop but, only for the length of time chosen (three seconds in this case), make a multiplication on the sample frame.

The following line could produce trouble:

_SndRaw Amplitude * Waveform

If that is computed to an absolute value greater than one, it's going to cause digital distortion. Check the code to make sure that value doesn't run out of control away from the range of -1.0 to 1.0.
Reply


Messages In This Thread
RE: neat _SndRaw example, but how do you stop _SndRaw from playing? - by mnrvovrfc - 08-17-2022, 02:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  _SNDRAW ahenry3068 2 747 08-27-2025, 11:49 AM
Last Post: a740g
  need help playing sound using certain parameters madscijr 0 400 04-01-2025, 03:52 PM
Last Post: madscijr
  Stop screen from resizing BloodyHash 2 576 05-20-2024, 11:26 AM
Last Post: SMcNeill
  Playing with the mouse NasaCow 13 2,673 12-13-2022, 02:45 PM
Last Post: TempodiBasic
  how do you stop a sequence of sounds created with the Sound command? madscijr 21 5,523 08-06-2022, 02:49 AM
Last Post: Pete

Forum Jump:


Users browsing this thread: 1 Guest(s)