CatchSound()

Syntax

Result = CatchSound(#Sound, MemoryAddress [, Length])
Description
Load a WAV or any other format supported by the SoundPlugin library contained at the specified address. If #PB_Any is used as '#Sound' parameter, the new sound identifier will be returned as 'Result'. If the 'Result' is not 0, the sound has been correctly loaded and is ready to be played with the command PlaySound(), else the sound loading has failed. With WAV files, the 'Length' parameter doesn't need to be specified. The following command can be used to enable automatically more sound format:

UseOGGSoundDecoder(): The 'Length' parameter must be specified if using an OGG file with CatchSound()

Example:
  CatchSound(0, ?Music)
  End

  DataSection
    Music: IncludeBinary "Sound.wav"
Note: The "?" is a pointer to a label. More informations about pointers and memory access can be found in the relating chapter here.

Supported OS

All

Sound Index - FreeSound() ->