_SNDLOOP - mkilgore/QB64pe GitHub Wiki

The _SNDLOOP statement is like _SNDPLAY but the sound is looped. Uses a handle from the _SNDOPEN function.

Syntax

_SNDLOOP handle&

Description

  • Plays the sound identified by handle& in a loop.

Examples

Example: Loading a sound or music file and playing it in a loop until a key is pressed.

DO
    _LIMIT 10   'keep CPU resources used low
LOOP UNTIL INKEY$ <> "" 'key press program exit
_SNDSTOP bg
_SNDCLOSE bg '' ''

See also


Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page
⚠️ **GitHub.com Fallback** ⚠️