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



Users browsing this thread: 1 Guest(s)