Description
Loads a new sound from the given file path.
Supported formats:
- Microsoft Wave (*.wav)
- Ogg-Vorbis-Audio (*.ogg)
Syntax
Result.i = UBE_LoadSoundFile( Sound.i, File.s [, Mode.i [, Name.s]] )
Parameters
Sound | The index of the new sound.
You can use #UBE_ANY to create a unique number. |
File | The path of sound file. |
Mode | A combination of following constants:
#UBE_SOUND_PLAY | Starts to play immediately. | #UBE_SOUND_BACKGROUND | Disable the position of the sound. | #UBE_SOUND_CHANNEL | Creates a new (copy) of the sound if it is played. | #UBE_SOUND_LOOP | Repeats the sound in a loop if it is played. | #UBE_SOUND_DOPPLEREFFECT | Enable the frequency change in dependence of the relative movement. | #UBE_SOUND_STREAM | Streams the sound from the file. |
|
Return value
If the function fails #Null
, otherwise the unique ID of the sound.
See also