1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-04 04:50:22 +00:00
QB64-PE/internal/help/_SNDLOOP__1111111.txt
Roland Heyder aeb9c0668b Updates help files for use with new Wiki parser (2nd try)
Note: Many files were removed (not yet existing/empty pages). The parser will try to download them on demand and will auto-generate text for missing pages (eg. most _gl pages).
2022-05-21 00:18:31 +02:00

35 lines
797 B
Plaintext

{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:10:58}}
{{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}}