Result = CatchSound(#Sound, *Buffer [, Size [, Flags]])Description
Load a WAV (in PCM format, ADPCM is not supported) or any other format supported by the SoundPlugin library found at the specified address. The following functions can be used to enable automatically more sound formats:
#Sound A number to identify the new sound. #PB_Any can be used to auto-generate this number. *Buffer The buffer to use to create the sound. This is a regular memory address. Size (optional) The buffer size (in bytes). With WAV files, this parameter doesn't need to be specified. With other sound decoders, it has to be specified. Flags (optional) It can be the following value:
Nonzero if the sound has been successfully created, zero otherwise.
CatchSound(0, ?Music) End DataSection Music: IncludeBinary "Sound.wav"
The "?" is a pointer to a label. More information about pointers and memory access can be found in the relating chapter here.
LoadSound(), FreeSound(), PlaySound()