Skip to content

A pure GML extension that enables loading external audio during runtime.

Notifications You must be signed in to change notification settings

katsaii/ExternalAudio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

PGEA?

GameMaker Studio 2 Pure GML External Audio

This is a pure GML extension that enables loading external audio during runtime.

Super Simple API

  • 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.

Only Supports WAV

Example

//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);

About

A pure GML extension that enables loading external audio during runtime.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Yacc 92.4%
  • Game Maker Language 7.6%