Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is SOUND synchronous or asynchronous ?
#4
(11-27-2022, 07:26 AM)DSMan195276 Wrote:
(11-27-2022, 02:54 AM)CharlieJV Wrote: I'm having a devil of a time getting that straight in my head.

`SOUND` waits for the duration of the sound, so it's synchronous. Note however that if you use `PLAY "MB"` at some point to play sounds in the background that also impacts `SOUND` commands, so it's possible to have them play in the background (potentially by accident). That behavior was recently fixed in QB64-PE v3.2.0, so if you use a version older than that `SOUND` won't respect the `PLAY "MB"` setting and will always wait for the sound to finish.

Let's see if I get it.

SOUND is asynchronous in the sense that a SOUND statement does not cause the entire program to pause until the statement finishes.

SOUND is synchronous in the sense that a SOUND statement cannot start until a previous SOUND statement completes.

Is that right?  Both asynchronous AND synchronous?
Reply


Messages In This Thread
RE: Is SOUND synchronous or asynchronous ? - by CharlieJV - 11-27-2022, 03:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  need help playing sound using certain parameters madscijr 0 401 04-01-2025, 03:52 PM
Last Post: madscijr
Question sound file playback (and record) - manipulating speed + pitch in realtime? madscijr 12 2,010 02-26-2025, 06:33 PM
Last Post: Petr
  List of file sound extensions eoredson 17 2,766 12-27-2024, 04:30 PM
Last Post: hsiangch_ong
  _SndPlayFile not starting sound file eoredson 11 2,480 07-20-2023, 04:33 PM
Last Post: TerryRitchie
  incorporate sound files in code mdijkens 6 1,188 01-02-2023, 11:24 AM
Last Post: a740g

Forum Jump:


Users browsing this thread: 1 Guest(s)