This is a pure GML extension that enables loading external audio during runtime.
- ext_audio_load(filename) - Returns ExternalAudio data structure with loaded audio data
- ext_audio_free(externalAudio) - Frees ExternalAudio data structure along with audio data
- ext_audio_get_id(externalAudio) - Returns actual sound ID to use with GM audio functions
- ext_audio_get_name(externalAudio) - Returns name of file without the path or extension
Check out the internal scripts if you want to see how everything else is done in more depth.
//First you need to load your external audio file
//This is limited to GameMaker sandbox limitations
externalAudio = ext_audio_load("path/to/file.wav");
//Then you get the sound id to be used with audio_* functions
externalSoundID = ext_audio_get_id(externalAudio);
//Use GameMaker audio_* functions like you normally would
audio_play_sound(externalSoundID, 10, false);
//This is also perfectly valid
//audio_play_sound(ext_audio_get_id(externalAudio), 10, false);