2022-07-31 21:57:56 +00:00
|
|
|
{{QBDLDATE:07-31-2022}}
|
|
|
|
{{QBDLTIME:23:40:15}}
|
2022-05-20 22:18:31 +00:00
|
|
|
{{DISPLAYTITLE:_SNDLOOP}}
|
|
|
|
The [[_SNDLOOP]] statement is like [[_SNDPLAY]] but the sound is looped. Uses a handle from the [[_SNDOPEN]] function.
|
|
|
|
|
|
|
|
|
|
|
|
{{PageSyntax}}
|
|
|
|
: [[_SNDLOOP]] {{Parameter|handle&}}
|
|
|
|
|
|
|
|
|
|
|
|
{{PageDescription}}
|
|
|
|
*Plays the sound identified by {{Parameter|handle&}} in a loop.
|
|
|
|
|
|
|
|
|
|
|
|
{{PageExamples}}
|
|
|
|
''Example:'' Loading a sound or music file and playing it in a loop until a key is pressed.
|
|
|
|
{{CodeStart}}
|
|
|
|
bg = {{Cl|_SNDOPEN}}("back.ogg") '<<<<<<<<<< change to your sound file name
|
|
|
|
{{Cl|_SNDLOOP}} bg
|
|
|
|
|
|
|
|
DO
|
|
|
|
{{Cl|_LIMIT}} 10 'keep CPU resources used low
|
|
|
|
{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> "" 'key press program exit
|
|
|
|
{{Cl|_SNDSTOP}} bg
|
|
|
|
{{Cl|_SNDCLOSE}} bg
|
|
|
|
{{CodeEnd}}
|
|
|
|
|
|
|
|
|
|
|
|
{{PageSeeAlso}}
|
|
|
|
* [[_SNDOPEN]], [[_SNDSTOP]]
|
|
|
|
|
|
|
|
|
|
|
|
{{PageNavigation}}
|
|
|
|
|
2022-07-31 21:57:56 +00:00
|
|
|
[[Category:Latest]]
|