ResumeSound()

Syntax

ResumeSound(#Sound [, Channel])
Description
Resume the sound playing.

Parameters

#Sound The sound to use. If #PB_All is specified, all the sounds (and all channels) are resumed.
Channel (optional) The channel to use. It's the value returned by PlaySound() when using the #PB_Sound_MultiChannel flag. If #PB_All is specified, all the channels of the sound are resumed.

Return value

None.

Remarks

Sounds loaded with the #PB_Sound_Streaming flag are not supported.

Example

  If InitSound()           ; Initialize Sound system
    UseOGGSoundDecoder()   ; Use ogg files
    
    ; Loads a sound from a file
    If LoadSound(0, #PB_Compiler_Home +"Examples/3D/Data/Siren.ogg")
      ; The sound is playing
      PlaySound(0, #PB_Sound_Loop)
      
      MessageRequester("Info", "Ok to pause.")
      PauseSound(0)  ; Pause
      
      MessageRequester("Info", "Ok to resume.")
      ResumeSound(0)  ; Resume
      
      MessageRequester("Info", "Ok to stop.")
      
      FreeSound(0) ; The sound is freed
      End
    EndIf
  Else
    Debug "Warning! The sound environment couldn't be initialized. So no sound commands can be used..."
  EndIf

See Also

LoadSound(), PauseSound()

Supported OS

All

<- PlaySound() - Sound Index - SetSoundFrequency() ->