audio_group_load

Load an audio group into memory asynchronously.

Syntax:

audio_group_load(groupID);


Argument Description
groupID The index of the audio group to load (as defined in the Global Game Settings Audio Groups Tab)


Returns: Boolean


Description

This function will load all the sounds that are flagged as belonging to the given Audio Group into memory. The function will return true if loading is initiated and false if the group ID is invalid, or it has already been flagged for loading. The function is asynchronous so your game will continue to run while the audio is loaded in the background. This means that it will also trigger an Asynchronous Load/Save Event to inform you that the whole group has been loaded into memory and the sounds can now be used.


Example:

if !audio_group_is_loaded(audiogroup_level1)
   {
   audio_group_load(audiogroup_level1);
   }

The above code checks to see if an audio group has been loaded and if not, it loads it.


Back: Audio Groups
Next: audio_group_unload
© Copyright YoYo Games Ltd. 2018 All Rights Reserved