Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do you stop a sequence of sounds created with the Sound command?
#6
This appears to be quite the conundrum. However, there is a definite way to do background music in a loop that can be killed whenever you want. You'd need to either open up a WAV file and then just allow it to continue playing using SNDLOOP until a certain key is pressed OR you can do something using the PlaySound function from Win32. You'd still need to use a WAV file OR learn how to make the WAVE resource in memory and pass it to the function. The function can run asynchronously and then you can kill the sound whenever you want.

I've never messed with the SOUND function before but maybe you should look into SNDOPENRAW, SNDRAW, and SNDCLOSE instead since you are working with frequencies and such. Those would allow you to kill the sound whenever without having to do some hacky thing with the C backend, Win32, threading, or premade WAV files.
The noticing will continue
Reply


Messages In This Thread
RE: how do you stop a sequence of sounds created with the Sound command? - by SpriggsySpriggs - 08-05-2022, 03:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Command$(count%) - I can't get a value when using the optional argument "(count%)" Unatic 3 518 08-22-2025, 11:58 AM
Last Post: Unatic
  keyword to get the EXE name and the EXE path instead of parsing Command$(0) ? madscijr 8 1,132 07-22-2025, 08:35 PM
Last Post: hsiangch_ong
  Command$ issues eoredson 8 1,350 05-02-2025, 01:42 AM
Last Post: eoredson
  need help playing sound using certain parameters madscijr 0 389 04-01-2025, 03:52 PM
Last Post: madscijr
  Locate command on the ttf graphical screens Helium5793 5 702 03-09-2025, 05:47 PM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)