audLoadMusic

Loads a music file for streaming playback. Takes filename (path to music file). Returns a music handle.

Audio

Parameters & Returns

Parameters

filename String

Returns

Int

Quick Summary

Loads a music file for streaming playback. Takes filename (path to music file). Returns a music handle.

Technical Exegesis...

Loads a music file and returns a music handle. Unlike audLoadSound, music is streamed from disk rather than fully loaded into memory, making it suitable for large audio files. Returns 0 if the filename is null or the file cannot be loaded.

Automatically initializes the audio engine on first use. Uses SoLoud::WavStream for efficient streaming. Supports WAV, OGG, MP3, and FLAC streaming audio formats. Music handles must be freed with audFreeMusic when no longer needed.

Example

Example.bam
Local music:Int = audLoadMusic(\"music.ogg\")