Sound_Player module

load_audio_file

procedureSource

Reads a sound file. The result has loaded set when it worked.

Example
sound := load_audio_file("music.ogg");
if !sound.loaded return;

This one is only checked to compile, not run.

load_audio_file :: (filename: string, optional := false) -> Sound_Data

Reads a sound file. The result has loaded set when it worked.

Parameters

filename: string
a WAV or Ogg Vorbis file.
optional := false
true when a missing file is fine, so it is not reported as an error.

Returns

Example
sound := load_audio_file("music.ogg");
if !sound.loaded return;

This one is only checked to compile, not run.

See also