Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
neat _SndRaw example, but how do you stop _SndRaw from playing?
#10
Setting "sngSoundRaw" variable to -1 or 1 just hard-clips the sound. You have to check the "Waveform" and "Amplitude" variables how they're being changed and find a way to reduce the absolute value of that multiplication. Try dividing "Amplitude" by 2 to see what happens.

"Hard-clip" is just rounding off a sound so that if the input sound is very very loud, it is transformed to be like silence, but it's annoying because when the audio was played back and then stopped, it causes a loud pop into headphones or speakers. It's not better cleaning DC offset. That's why sound engineers look to prevent it.

I took another look at the code. The problem with one of the functions is that "Modulator" is always going at full blast while "Waveform" has to experience some reduction. "Amplitude" is already being set very small, to one-over-million, so the culprit might be the modulation depth. Both "Modulator" and "Waveform" have to experience some sort of reduction.
Reply


Messages In This Thread
RE: neat _SndRaw example, but how do you stop _SndRaw from playing? - by mnrvovrfc - 08-17-2022, 03:06 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,687 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,528 08-06-2022, 02:49 AM
Last Post: Pete

Forum Jump:


Users browsing this thread: 1 Guest(s)