Skip to content

LoopSound

Narta Xaymar Dirks edited this page Oct 28, 2026 · 6 revisions

Blitz3DBlitzPlusBlitzBasic

LoopSound

LoopSound:Void sound:Int32
Parameter Mode Type Default Description
sound In Int32 required A handle from LoadSound.

Description

Marks a sound so that it plays in an endless loop whenever it is played from now on. It does not start the sound: call PlaySound for that. Channels that already play the sound are not changed. Stop a looping sound with StopChannel.

Differences

  • There is no command to switch looping off again.
  • A debug build (-d) stops the program when the sound is 0 (a sound that failed to load) or does not exist, other builds ignore the command, see Debug handle checks.

Examples

; MakeBeep writes beep.wav, see the LoadSound example for the code.
Local snd = LoadSound("beep.wav")
LoopSound snd
Local ch = PlaySound(snd)
Delay 1800
StopChannel ch

Related Commands

FreeSound, Load3DSound, LoadSound, PlaySound, SoundPan, SoundPitch, SoundVolume

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally