@bscotch/gml-parser
Version:
A parser for GML (GameMaker Language) files for programmatic manipulation and analysis of GameMaker projects.
433 lines (419 loc) • 1.59 MB
text/xml
<?xml version="1.0" encoding="utf-8"?>
<GameMakerLanguageSpec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" RuntimeVersion="2022.4" Module="Base">
<Functions>
<Function Name="animcurve_channel_evaluate" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function gets the value at a specific point in time from a channel struct. </Description>
<Parameter Name="channel_struct" Type="Struct.AnimCurveChannel" Optional="false">The struct pointer for the channel to evaluate.</Parameter>
<Parameter Name="posx" Type="Real" Optional="false">The position in time to check (from 0 to 1).</Parameter>
</Function>
<Function Name="animcurve_channel_new" Deprecated="false" ReturnType="Struct.AnimCurveChannel" Pure="true">
<Description>This function creates a new animation curve channel struct.</Description>
</Function>
<Function Name="animcurve_create" Deprecated="false" ReturnType="Struct.AnimCurve" Pure="false">
<Description>This function creates an empty animation curve struct, ready for you to populate with channel data.</Description>
</Function>
<Function Name="animcurve_destroy" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function destroys an animation curve previously created with the function animcurve_create().</Description>
<Parameter Name="curve_struct" Type="Struct.AnimCurve" Optional="false">The pointer to the curve struct to destroy.</Parameter>
</Function>
<Function Name="animcurve_get" Deprecated="false" ReturnType="Struct.AnimCurve" Pure="true">
<Description>This function returns a struct containing all the data for the given animation curve.</Description>
<Parameter Name="curve_id" Type="Asset.GMAnimCurve" Optional="false">The asset ID (index) of the animation curve to get.</Parameter>
</Function>
<Function Name="animcurve_get_channel" Deprecated="false" ReturnType="Struct.AnimCurveChannel" Pure="true">
<Description>This function returns the struct containing the channel data for the channel specified in an animation curve asset or struct (as returned by animcurve_get()).</Description>
<Parameter Name="curve_struct_or_id" Type="Asset.GMAnimCurve,Struct.AnimCurve" Optional="false">The ID or struct pointer of the animation curve to target</Parameter>
<Parameter Name="channel_name_or_index" Type="String,Real" Optional="false">The channel name (a string) or the channel index (an integer).</Parameter>
</Function>
<Function Name="animcurve_get_channel_index" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the index value for any given animation curve channel.
You supply the animation curve ID or struct, where the curve ID is the name of the animation curve as it was defined in the Asset Browser, or the struct pointer as returned by the function animcurve_create(). You then supply the name of the channel, as a string, and the function will return the index value associated with that channel. Note that if the curve or channel does not exist then you will get an error.</Description>
<Parameter Name="curve_struct_or_id" Type="Struct.AnimCurve" Optional="false">The ID or struct pointer of the animation curve to target</Parameter>
<Parameter Name="channel_name" Type="String" Optional="false">The channel name.</Parameter>
</Function>
<Function Name="animcurve_point_new" Deprecated="false" ReturnType="Struct.AnimCurvePoint" Pure="true">
<Description>This function creates a new points struct (posx, value) to be added to an animation curve channel.</Description>
</Function>
<Function Name="asset_add_tags" Deprecated="false" ReturnType="Bool" Pure="false">
<Description>This function adds one or more tag strings to any asset from the Asset Browser.
You supply either the asset name (as a string) or its asset index, as well as either a single tag string or an array where each item is a single tag string. If you supply an asset index value, then you will need to supply the optional asset type argument (a constant), as assets of different types can have the same index, even though they cannot have the same name.</Description>
<Parameter Name="name_or_index" Type="String,Asset" Optional="false">The name of the asset (a string) or its index value (an integer).</Parameter>
<Parameter Name="tags" Type="String,Array[String]" Optional="false">A single asset tag string or an array with various asset tags.</Parameter>
<Parameter Name="asset_type" Type="Constant.AssetType" Optional="true">OPTIONAL! The type of asset to set the tags on, only used when supplying an index for the first argument.</Parameter>
</Function>
<Function Name="asset_clear_tags" Deprecated="false" ReturnType="Bool" Pure="false">
<Description>This function clears all tags present on the given asset from the Asset Browser and returns whether any tags were removed.
You supply either the asset name (as a string) or its asset index, and if you supply an asset index value, then you will need to supply the optional asset type argument (a constant), as assets of different types can have the same index, even though they cannot have the same name.</Description>
<Parameter Name="name_or_index" Type="String,Asset" Optional="false">The name of the asset (a string) or its index value (an integer).</Parameter>
<Parameter Name="asset_type" Type="Constant.AssetType" Optional="true">OPTIONAL! The type of asset to clear the tags from, only used when supplying an index for the first argument.</Parameter>
</Function>
<Function Name="asset_get_index" Deprecated="false" ReturnType="Asset" Pure="true">
<Description>This function gets the handle for a game asset from its name.
If the asset is not found, the function will return a value of -1, otherwise it will return the handle for the asset being checked. This handle can then be used in other functions as you would any other handle, like sprite_index or path_index, for example.</Description>
<Parameter Name="name" Type="String,Asset" Optional="false">The name of the game asset to get the index of (a string).</Parameter>
</Function>
<Function Name="asset_get_tags" Deprecated="false" ReturnType="Array[String]" Pure="true">
<Description>This function retrieves all tags assigned to an asset from the Asset Browser.
You supply either the asset name (as a string) or its asset index, and the function will return an array of tags for that asset. If no tags are found or there is an error (i.e.: the name string given doesn't exist) then the returned array will be empty.</Description>
<Parameter Name="name_or_index" Type="String,Asset" Optional="false">The name of the asset (a string) or its index value (an integer).</Parameter>
<Parameter Name="asset_type" Type="Constant.AssetType" Optional="true">OPTIONAL! The type of asset to get the tags for, only used when supplying an index for the first argument.</Parameter>
</Function>
<Function Name="asset_get_type" Deprecated="false" ReturnType="Constant.AssetType" Pure="true">
<Description>This function gets the type of asset being referenced from its name.</Description>
<Parameter Name="name" Type="String,Asset" Optional="false">The name of the game asset to get the type of.</Parameter>
</Function>
<Function Name="asset_get_ids" Deprecated="false" ReturnType="Array[Asset]" Pure="true">
<Description>This function returns an array containing IDs of all existing assets of given type.</Description>
<Parameter Name="asset_type" Type="Constant.AssetType" Optional="false">The type of assets to retrieve an array of.</Parameter>
</Function>
<Function Name="asset_has_tags" Deprecated="false" ReturnType="Bool" Pure="true">
<Description>This function checks if one or more tag strings is assigned to the given asset from the Asset Browser.
You supply either the asset name (as a string) or its asset index, as well as either a single tag string or an array where each item is a single tag string. If you supply an asset index value, then you will need to supply the optional asset type argument (a constant), as assets of different types can have the same index, even though they cannot have the same name.</Description>
<Parameter Name="name_or_index" Type="String,Asset" Optional="false">The name of the asset (a string) or its index value (an integer).</Parameter>
<Parameter Name="tags" Type="String,Array[String]" Optional="false">A single asset tag string or an array with various asset tags.</Parameter>
<Parameter Name="asset_type" Type="Constant.AssetType" Optional="true">OPTIONAL! The type of asset to check the tags for, only used when supplying an index for the first argument.</Parameter>
</Function>
<Function Name="asset_remove_tags" Deprecated="false" ReturnType="Bool" Pure="false">
<Description>This function removes one or more tag strings to any asset from the Asset Browser.
You supply either the asset name (as a string) or its asset index, as well as either a single tag string or an array where each item is a single tag string. If you supply an asset index value, then you will need to supply the optional asset type argument (a constant), as assets of different types can have the same index, even though they cannot have the same name.</Description>
<Parameter Name="name_or_index" Type="String,Asset" Optional="false">The name of the asset (a string) or its index value (an integer).</Parameter>
<Parameter Name="tags" Type="String,Array[String]" Optional="false">A single asset tag string or an array with various asset tags.</Parameter>
<Parameter Name="asset_type" Type="Constant.AssetType" Optional="true">OPTIONAL! The type of asset to remove the tags from, only used when supplying an index for the first argument.</Parameter>
</Function>
<Function Name="tag_get_assets" Deprecated="false" ReturnType="Array[String]" Pure="true">
<Description>This function retrieves the names of all assets that have been assigned the given tag or tags.
You supply either a single tag string or an array, where each item in the array is a tag string. The function will return an array where each entry is the name (as a string) of the asset with the given tag. If you need the unique index for the asset, then you can use the function asset_get_index() along with the returned name. If there are no assets with the given tag(s), or if there is an error (e.g., the given tags do not exist), then an empty array will be returned.</Description>
<Parameter Name="tags" Type="String,Array[String]" Optional="false">A single asset tag string or an array with various asset tags.</Parameter>
</Function>
<Function Name="tag_get_asset_ids" Deprecated="false" ReturnType="Array[Asset]" Pure="true">
<Description>This function gets all the assets of a given type that have the given tags assigned to them.
You supply either a single tag (as a string) or an array, where each item in the array is a tag (as a string), as well as the type of asset to check.</Description>
<Parameter Name="tags" Type="String,Array[String]" Optional="false">A single asset tag string or an array with various asset tags.</Parameter>
<Parameter Name="asset_type" Type="Constant.AssetType" Optional="false">An asset type constant (listed above)</Parameter>
</Function>
<Function Name="audio_channel_num" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can set how many audio channels are available for playing audio in GameMaker.</Description>
<Parameter Name="num" Type="Real" Optional="false">Number of available audio channels (default is 128).</Parameter>
</Function>
<Function Name="audio_create_stream" Deprecated="false" ReturnType="Asset.GMSound" Pure="false">
<Description>With this function you can create a new sound index which can then be used in the regular audio functions to stream audio directly from an external OGG file source. The function requires the filename (which can be an included file, for example) and will return the new sound index for use. Note that after you no longer need the sound you should call the function audio_destroy_stream() with the sound index to remove it from memory otherwise you may get a memory leak which will slow down and eventually crash your game.</Description>
<Parameter Name="filename" Type="String" Optional="false">The file (OGG only) to stream the audio from.</Parameter>
</Function>
<Function Name="audio_debug" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function can be used to display debug information about the audio system, with true switching it on and false to switch it off.
Enabling this will display the Audio window of The Debug Overlay.</Description>
<Parameter Name="enable" Type="Bool" Optional="false">Enable (set to true) or disable (false) audio debugging.</Parameter>
</Function>
<Function Name="audio_throw_on_error" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function can be used to toggle whether errors returned from the audio engine should throw runtime errors which abort the game.</Description>
<Parameter Name="enable" Type="Bool" Optional="false">Enable or disable throwing.</Parameter>
</Function>
<Function Name="audio_destroy_stream" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function destroys a previously created audio stream from memory.
Any further calls to the sound after it has been destroyed will give an error.</Description>
<Parameter Name="sound" Type="Asset.GMSound" Optional="false">The sound asset, as returned by audio_create_stream.</Parameter>
</Function>
<Function Name="audio_exists" Deprecated="false" ReturnType="Bool" Pure="true">
<Description>This function returns whether a Sound Asset exists.
The sound to check can either be a single instance of a sound (the index for individual sounds being played can be stored in a variable when using the audio_play_sound or audio_play_sound_at functions) or a sound asset.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to check the existence of.</Parameter>
</Function>
<Function Name="audio_falloff_set_model" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function sets the audio falloff model used in your game.</Description>
<Parameter Name="model" Type="Constant.AudioFalloff" Optional="false">The constant used to set the falloff model.</Parameter>
</Function>
<Function Name="audio_get_master_gain" Deprecated="false" ReturnType="Real" Pure="true">
<Description>With this function you can get the absolute value for the global volume of all sounds and music for a specific listener.</Description>
<Parameter Name="listenerindex" Type="Real,Id.AudioListener" Optional="false">The index of the listener to get the gain of.</Parameter>
</Function>
<Function Name="audio_get_name" Deprecated="false" ReturnType="String" Pure="true">
<Description>This function will return the name of a given audio asset as a string.</Description>
<Parameter Name="index" Type="Id.Sound,Asset.GMSound" Optional="false">The index of the sound to check.</Parameter>
</Function>
<Function Name="audio_get_type" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the type of the given sound asset, which can be either streamed (1) or in memory (0).</Description>
<Parameter Name="index" Type="Id.Sound,Asset.GMSound" Optional="false">The index of the sound to check.</Parameter>
</Function>
<Function Name="audio_is_paused" Deprecated="false" ReturnType="Bool" Pure="true">
<Description>This function will check the given sound to see if it is currently paused.</Description>
<Parameter Name="index" Type="Id.Sound,Asset.GMSound" Optional="false">The index of the sound to check.</Parameter>
</Function>
<Function Name="audio_is_playing" Deprecated="false" ReturnType="Bool" Pure="true">
<Description>This function will check the given sound to see if it is currently playing.</Description>
<Parameter Name="index" Type="Id.Sound,Asset.GMSound" Optional="false">The index of the sound to check.</Parameter>
</Function>
<Function Name="audio_master_gain" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can set the absolute value for the global volume of all sounds and music.</Description>
<Parameter Name="gain" Type="Real" Optional="false">Value for the global volume (0 to 1).</Parameter>
</Function>
<Function Name="audio_pause_all" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can pause all sounds that are currently playing.</Description>
</Function>
<Function Name="audio_pause_sound" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can pause any sound that is currently playing. The sound can either be a single instance of a sound (the index for individual sounds being played can be stored in a variable when using the audio_play_sound() or audio_play_sound_at() functions) or a sound asset, in which case all instances of the given sound will be paused.</Description>
<Parameter Name="index" Type="Id.Sound,Asset.GMSound" Optional="false">The index of the sound to pause.</Parameter>
</Function>
<Function Name="audio_play_sound" Deprecated="false" ReturnType="Id.Sound" Pure="false">
<Description>This function plays any Sound Asset in your game.</Description>
<Parameter Name="index" Type="Asset.GMSound" Optional="false">The index of the sound to play.</Parameter>
<Parameter Name="priority" Type="Real" Optional="false">Set the channel priority for the sound.</Parameter>
<Parameter Name="loop" Type="Bool" Optional="false">Sets the sound to loop or not.</Parameter>
<Parameter Name="gain" Type="Real" Optional="true">Sets the gain of the sound played.</Parameter>
<Parameter Name="offset" Type="Real,Undefined" Optional="true">Sets the start offset (in seconds) of the sound played.</Parameter>
<Parameter Name="pitch" Type="Real" Optional="true">Sets the pitch of the sound played.</Parameter>
<Parameter Name="listener_mask" Type="Real" Optional="true">Sets the listener mask of the sound played.</Parameter>
</Function>
<Function Name="audio_play_sound_at" Deprecated="false" ReturnType="Id.Sound" Pure="false">
<Description>With this function you can play any sound asset at a given position within the audio space.</Description>
<Parameter Name="index" Type="Asset.GMSound" Optional="false">The index of the sound to play.</Parameter>
<Parameter Name="x" Type="Real" Optional="false">The x position.</Parameter>
<Parameter Name="y" Type="Real" Optional="false">The y position.</Parameter>
<Parameter Name="z" Type="Real" Optional="false">The z position.</Parameter>
<Parameter Name="falloff_ref" Type="Real" Optional="false">The falloff reference relative to the listener (clamp).</Parameter>
<Parameter Name="falloff_max" Type="Real" Optional="false">The maximum falloff distance relative to the listener.</Parameter>
<Parameter Name="falloff_factor" Type="Real" Optional="false">The falloff factor (default 1).</Parameter>
<Parameter Name="loop" Type="Bool" Optional="false">Flags the sound as looping or not.</Parameter>
<Parameter Name="priority" Type="Real" Optional="false">Set the channel priority for the sound.</Parameter>
<Parameter Name="gain" Type="Real" Optional="true">Sets the gain of the sound played.</Parameter>
<Parameter Name="offset" Type="Real,Undefined" Optional="true">Sets the start offset (in seconds) of the sound played.</Parameter>
<Parameter Name="pitch" Type="Real" Optional="true">Sets the pitch of the sound played.</Parameter>
<Parameter Name="listener_mask" Type="Real" Optional="true">Sets the listener mask of the sound played.</Parameter>
</Function>
<Function Name="audio_play_sound_ext" Deprecated="false" ReturnType="Id.Sound" Pure="false">
<Description>This function plays any sound asset in your game using any combination of parameters.</Description>
<Parameter Name="params" Type="Struct" Optional="false">A struct containing a set of playback parameters.</Parameter>
</Function>
<Function Name="audio_sound_get_asset" Deprecated="false" ReturnType="Asset.GMSound" Pure="true">
<Description>This function returns the Sound Asset that was used to play the given Sound Instance ID. The sound must be active (i.e. currently playing) for this function to return the correct value, otherwise it will throw a fatal error.</Description>
<Parameter Name="index" Type="Id.Sound" Optional="false">The voice index of the sound.</Parameter>
</Function>
<Function Name="audio_resume_all" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can resume all sounds that have been paused previously.</Description>
</Function>
<Function Name="audio_resume_sound" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can resume any sound that is currently paused (after using the function audio_pause_sound()).</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to resume.</Parameter>
</Function>
<Function Name="audio_set_master_gain" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can set the absolute value for the global volume of all sounds and music for a specific listener.
The default listener index is 0, but you can use the function audio_get_listener_info() to get the different indices available for the target platform. The gain value is based on a linear scale from 0 (silent) to 1 (full volume) and will affect the relative volume of all sounds and music played from within your game through that listener.</Description>
<Parameter Name="listenerindex" Type="Real,Id.AudioListener" Optional="false">The index of the listener to set the gain on.</Parameter>
<Parameter Name="gain" Type="Real" Optional="false">Value for the global volume (0 to 1).</Parameter>
</Function>
<Function Name="audio_sound_gain" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can fade a sound in or out over a given length of time, or it can be used to set the sound gain instantly.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to set the gain for.</Parameter>
<Parameter Name="volume" Type="Real" Optional="false">Value for the music volume.</Parameter>
<Parameter Name="time" Type="Real" Optional="true">The length for the change in gain in milliseconds.</Parameter>
</Function>
<Function Name="audio_sound_get_gain" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function will return the current gain value for the given sound.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to get the gain of.</Parameter>
</Function>
<Function Name="audio_sound_get_listener_mask" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function will return the bit-mask data that defines which audio listeners a sound should be played from.</Description>
<Parameter Name="soundid" Type="Asset.GMSound,Id.Sound" Optional="false">The unique ID of the sound to get the mask of</Parameter>
</Function>
<Function Name="audio_sound_get_pitch" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function can be used to get the pitch of a given sound.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to get the pitch of.</Parameter>
</Function>
<Function Name="audio_sound_get_track_position" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function will get the position (in seconds) within the sound file for the sound to play from.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to get the play position of.</Parameter>
</Function>
<Function Name="audio_sound_is_playable" Deprecated="false" ReturnType="Bool" Pure="true">
<Description>This function can be used to check if the given sound index can be played currently.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to check.</Parameter>
</Function>
<Function Name="audio_sound_length" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the length of the given sound in seconds.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to check.</Parameter>
</Function>
<Function Name="audio_sound_pitch" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function changes the pitch of the given sound asset or instance.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to change.</Parameter>
<Parameter Name="pitch" Type="Real" Optional="false">The pitch multiplier (default 1).</Parameter>
</Function>
<Function Name="audio_sound_set_listener_mask" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function can be used to set the the bit-mask for a sound so that it will play only from those listeners specified.</Description>
<Parameter Name="soundid" Type="Asset.GMSound,Id.Sound" Optional="false">The unique ID of the sound to set the mask of</Parameter>
<Parameter Name="mask" Type="Real" Optional="false">The bitmask data to set for the sound</Parameter>
</Function>
<Function Name="audio_sound_set_track_position" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function will set the position (in seconds) for the given sound ID or asset.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to change.</Parameter>
<Parameter Name="time" Type="Real" Optional="false">The time (in seconds) to set the start point to.</Parameter>
</Function>
<Function Name="audio_sound_loop" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function will set the state of a playing sound's loop section.</Description>
<Parameter Name="index" Type="Id.Sound" Optional="false">The index of the sound to change.</Parameter>
<Parameter Name="state" Type="Bool" Optional="false">The state that the loop section should be set to.</Parameter>
</Function>
<Function Name="audio_sound_get_loop" Deprecated="false" ReturnType="Bool" Pure="true">
<Description>This function will return the state of a playing sound's loop section.</Description>
<Parameter Name="index" Type="Id.Sound" Optional="false">The index of the sound whose loop section state is retrieved.</Parameter>
</Function>
<Function Name="audio_sound_loop_start" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function will set the offset (in seconds) of the start of a sound's loop section.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to change.</Parameter>
<Parameter Name="time" Type="Real" Optional="false">The offset (in seconds) to set the start of the loop section to.</Parameter>
</Function>
<Function Name="audio_sound_get_loop_start" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function will return the offset (in seconds) of the start of a sound's loop section.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound whose loop-start is retrieved.</Parameter>
</Function>
<Function Name="audio_sound_loop_end" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function will set the offset (in seconds) of the end of a sound's loop section.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to change.</Parameter>
<Parameter Name="time" Type="Real" Optional="false">The offset (in seconds) to set the end of the loop section to.</Parameter>
</Function>
<Function Name="audio_sound_get_loop_end" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function will return the offset (in seconds) of the end of a sound's loop section.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound whose loop-end is retrieved.</Parameter>
</Function>
<Function Name="audio_stop_all" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function will stop all sounds that are currently playing.</Description>
</Function>
<Function Name="audio_stop_sound" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function will stop the given sound if it is currently playing.
This includes all sounds that have been paused using audio_pause_sound or audio_pause_all.</Description>
<Parameter Name="index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound to stop.</Parameter>
</Function>
<Function Name="audio_system_is_available" Deprecated="false" ReturnType="Bool" Pure="true">
<Description>This function can be used to check and see if the audio system has been initialised, or if the audio context is running. On all platforms, this function will return true immediately after Game Start when the audio engine is initialised, except on the Opera GX and HTML5 targets. On Opera GX and HTML5, the audio context status can change at any time depending on user input, the browser being used, and its version, so this function can be used to check and see if audio can be played or not. If the function returns false (ie: the audio context status is not running), then only unstreamed sounds may play (but it's not guaranteed, and you should assume that no audio can be played), while if it returns true then all audio will play.</Description>
</Function>
<Function Name="audio_system_is_initialised" Deprecated="false" ReturnType="Bool" Pure="true">
<Description>This function can be used to check if the audio engine has been initialised, after which all audio functions can be called normally. For all targets other than HTML5, this will return true on Game Start. On HTML5, this may only begin to return true after Game Start. While audio_system_is_available() reflects the ability to play audio, this function reflects the ability to call audio functions more generally.</Description>
</Function>
<Function Name="audio_create_buffer_sound" Deprecated="false" ReturnType="Asset.GMSound" Pure="false">
<Description>With this function you can create a new sound from the contents of a buffer. The buffer will have been created previously, and have had data added or loaded into it. You then pass it to this function with the data format (only buffer_u8 or buffer_s16 are currently supported), the sample rate (which can be between 1000hz and 48000hz), and an offset into the buffer to get the data from. You also need to supply the number of samples in the buffer and the channels that the sound requires.</Description>
<Parameter Name="bufferId" Type="Id.Buffer" Optional="false">The ID of the buffer to use.</Parameter>
<Parameter Name="bufferFormat" Type="Constant.BufferDataType" Optional="false">The format of the data in the buffer (buffer_u8 or buffer_s16).</Parameter>
<Parameter Name="bufferRate" Type="Real" Optional="false">The sample rate of the data in the buffer.</Parameter>
<Parameter Name="bufferOffset" Type="Real" Optional="false">The offset into the buffer to read the sample data from (in bytes).</Parameter>
<Parameter Name="bufferLength" Type="Real" Optional="false">The length of the buffer (the number of bytes of audio data, excluding the header).</Parameter>
<Parameter Name="bufferChannels" Type="Constant.AudioChannelType" Optional="false">The channels to use (audio_mono, audio_stereo or audio_3D).</Parameter>
</Function>
<Function Name="audio_create_play_queue" Deprecated="false" ReturnType="Real" Pure="false">
<Description>This function prepares a buffer queue for audio. You pass data format (only buffer_u8 or buffer_s16 are currently supported), the sample rate (which can be between 1000hz and 48000hz), and the channels that the audio requires from one of the constants listed below:</Description>
<Parameter Name="queueformat" Type="Constant.BufferDataType" Optional="false">The format of the buffer data to use (buffer_u8 or buffer_s16).</Parameter>
<Parameter Name="queuerate" Type="Real" Optional="false">The sample rate of the data in the buffer queue.</Parameter>
<Parameter Name="queuechannels" Type="Real" Optional="false">The channels to use from one of the constants listed below.</Parameter>
</Function>
<Function Name="audio_free_buffer_sound" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can free up the pointer index value associated with the sound ID. Freed sounds will not be available for playing, and if multiple instances of the sound are being played they will all be stopped. Note that before you can delete the buffer itself, you must first free all sound ID's associated with it.</Description>
<Parameter Name="index" Type="Real|Asset.GMSound" Optional="false">The index of the buffered sound to free.</Parameter>
</Function>
<Function Name="audio_free_play_queue" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function is used to free up the memory associated with the given audio queue. The queue index is the value returned when you created the queue using the function audio_create_play_queue(), and this function should be called when the queue is no longer required to prevent memory leaks. Freeing the queue will stop any sound that is be playing, and you cannot delete the buffer that a sound is being streamed from until the queue it is assigned to has been freed. This function will trigger an Audio Playback Asynchronous Event, and in this event a special DS map will be created in the variable async_load with the following key/value pairs:</Description>
<Parameter Name="queueindex" Type="Real" Optional="false">The index of the queue to free.</Parameter>
</Function>
<Function Name="audio_get_recorder_count" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function will return the number of audio recording sources (like microphones, etc.) currently available to your game. So, if you have a return value of, for example, four, then you will have audio input on the sources 0, 1, 2 and 3, with one of these values being that which you use to start recording from using the function audio_start_recording(). This value can change at any time as people plug/unplug microphones or other input sources to the device. Note that you can use the function audio_get_recorder_info() to get information on each device connected.</Description>
</Function>
<Function Name="audio_get_recorder_info" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function will return a DS Map with information about the given recorder source index. You can find out how many recorder sources are available using the function audio_get_recorder_count(), and the map returned will contain the following key/value pairs:</Description>
<Parameter Name="recorder_index" Type="Real" Optional="false">The index of the recorder source to get the information from.</Parameter>
</Function>
<Function Name="audio_queue_sound" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function will add the data from a buffer into the audio queue that you previously created using the function audio_create_play_queue(). You specify the queue index to add to, and the buffer ID to get the data from as well as the position (offset) within the buffer and the number of bytes to add. Once you have added audio from a buffer to a queue, the buffer cannot be deleted until you have first freed the queue using the function audio_free_play_queue(), and the buffer properties should match those of the the queue that you are adding the sound to.</Description>
<Parameter Name="queueindex" Type="Real" Optional="false">The index of the queue to add to.</Parameter>
<Parameter Name="bufferid" Type="Id.Buffer" Optional="false">The buffer to add to the queue.</Parameter>
<Parameter Name="bufferoffset" Type="Real" Optional="false">The offset within the source buffer to start from.</Parameter>
<Parameter Name="bufferlength" Type="Real" Optional="false">The length of the buffer (the number of the bytes in the buffer).</Parameter>
</Function>
<Function Name="audio_start_recording" Deprecated="false" ReturnType="Real" Pure="false">
<Description>This function will start recording audio from the recorder source indexed. You can get the number of recorder sources using the function audio_get_recorder_count(), and once you start recording the audio will be stored in a temporary buffer and start triggering an Audio Recording Asynchronous Event. This event is triggered every step that recording takes place and will create the special DS map in the variable async_load with the following key/value pairs:</Description>
<Parameter Name="recorder_index" Type="Real" Optional="false">The index of the recorder source to use.</Parameter>
</Function>
<Function Name="audio_stop_recording" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function will stop recording on the given recorder channel (the channel index is returned when you call the function audio_start_recording()). When you stop recording, no further Audio Recording Asynchronous Events will be triggered for the given recorder channel, so you would normally use this function in the actual asynchronous event to ensure that you have captured all the data.</Description>
<Parameter Name="channel_index" Type="Real" Optional="false">The index of the recorder channel to stop.</Parameter>
</Function>
<Function Name="audio_emitter_create" Deprecated="false" ReturnType="Id.AudioEmitter" Pure="false">
<Description>This function creates a new audio emitter and returns the index for it. This index should be stored in a variable for all further functions that relate to this emitter, and then when it is no longer needed it should be removed from memory using the function audio_emitter_free() to prevent memory leaks which may eventually crash your game.</Description>
</Function>
<Function Name="audio_emitter_exists" Deprecated="false" ReturnType="Bool" Pure="true">
<Description>This function returns whether an audio emitter exists (true) or not (false). Note that if the index you search for has not been initialised previously, this function will cause an error as it is searching for non-existent indices.</Description>
<Parameter Name="index" Type="Id.AudioEmitter" Optional="false">The index of the emitter to check the existence of.</Parameter>
</Function>
<Function Name="audio_emitter_falloff" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can set the fall-off distance for an emitter. This is the distance from the listener the emitter has to be before the sound will have "fallen off" to a volume of 0. The default value for this is 100, but beware of setting this to any value lower than 1 as that will make any sound played through this emitter inaudible to the listener, however any other value will cause the sound to fade away the further that the emitter is from the listener.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to change.</Parameter>
<Parameter Name="falloff_ref" Type="Real" Optional="false">The falloff reference relative to the listener (clamp).</Parameter>
<Parameter Name="falloff_max" Type="Real" Optional="false">The maximum falloff distance relative to the listener.</Parameter>
<Parameter Name="falloff_factor" Type="Real" Optional="false">The falloff factor (default 1).</Parameter>
</Function>
<Function Name="audio_emitter_free" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can remove the given emitter from memory. This should always be done whenever the emitter is not going to be used further in the room or the game, ie: in the Destroy Event of the instance or in the Room End Event, otherwise you may end up with a memory leak that will slow down and eventually crash your game.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to free.</Parameter>
</Function>
<Function Name="audio_emitter_gain" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function sets the maximum gain (volume) for the sound. The perceived volume for a sound can change depending on the fall-off value and the position it has relative to the listener, but by setting the gain with this function, the full volume will never exceed the specified gain value. The image below illustrates how gain affects the volume of the emitter when fall-off is greater than 0:</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to change.</Parameter>
<Parameter Name="gain" Type="Real" Optional="false">The maximum gain (default 1).</Parameter>
<Parameter Name="time" Type="Real" Optional="true">The length for the change in gain in milliseconds.</Parameter>
</Function>
<Function Name="audio_emitter_get_gain" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the current gain (volume) set for the given audio emitter, normally between 0 and 1, where 0 is silent and 1 is full volume. Note that on some platforms you can have a gain of greater than 1, although a value of 1 is considered "full volume" and anything greater may introduce audio clipping.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to use.</Parameter>
</Function>
<Function Name="audio_emitter_get_listener_mask" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function will return the bit-mask data that defines which audio listeners an emitter should play sounds from. For more information see the section on Audio Listeners.</Description>
<Parameter Name="emitterid" Type="Id.AudioEmitter" Optional="false">The unique ID of the emitter to get the mask of</Parameter>
</Function>
<Function Name="audio_emitter_get_pitch" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the current pitch value set for the given audio emitter.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to use.</Parameter>
</Function>
<Function Name="audio_emitter_get_vx" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the current velocity along the x axis for the given audio emitter.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to use.</Parameter>
</Function>
<Function Name="audio_emitter_get_vy" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the current velocity along the y axis for the given audio emitter.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to use.</Parameter>
</Function>
<Function Name="audio_emitter_get_vz" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the current velocity along the z axis for the given audio emitter.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to use.</Parameter>
</Function>
<Function Name="audio_emitter_get_x" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the current x position of the given audio emitter.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to use.</Parameter>
</Function>
<Function Name="audio_emitter_get_y" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the current y position of the given audio emitter.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to use.</Parameter>
</Function>
<Function Name="audio_emitter_get_z" Deprecated="false" ReturnType="Real" Pure="true">
<Description>This function returns the current z position of the given audio emitter.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to use.</Parameter>
</Function>
<Function Name="audio_emitter_pitch" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function can be used to change the pitch of all sounds emitted from the given emitter. It is a pitch multiplier, in that the input value multiplies the current pitch by that amount, so the default value of 1 is no pitch change, while a value of less than 1 will lower the pitch and greater than 1 will raise the pitch. It is best to use small increments for this function as any value under 0 or over 5 may not be audible anyway.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to change.</Parameter>
<Parameter Name="pitch" Type="Real" Optional="false">The pitch multiplier (default 1).</Parameter>
</Function>
<Function Name="audio_emitter_position" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>With this function you can change the position of an audio emitter within the 3D audio space. The position will affect the sound in different ways depending on where the listener is positioned within the audio space too (default position is (0, 0, 0). See audio_listener_position() for more information), so for example if the emitter position is set to (100, 0, 0) and the current listener is at (200, 0, 0) the audio streamed from the emitter will appear to be on the left of the audio field.</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to change.</Parameter>
<Parameter Name="x" Type="Real" Optional="false">The x position.</Parameter>
<Parameter Name="y" Type="Real" Optional="false">The y position.</Parameter>
<Parameter Name="z" Type="Real" Optional="false">The z position.</Parameter>
</Function>
<Function Name="audio_emitter_set_listener_mask" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function can be used to set the the bit-mask for an emitter so that all sounds played through the emitter will play only from those listeners specified. You can create a bit-mask by using the audio_get_listener_info() and then using the bitwise or ("|") to create a custom mask with those listeners that you require the sound to play from, and then apply this custom mask to the emitter. This mask will over-ride the default mask or that which you may have set using the function audio_set_listener_mask().</Description>
<Parameter Name="emitterid" Type="Id.AudioEmitter" Optional="false">The unique ID of the emitter to set the mask of</Parameter>
<Parameter Name="mask" Type="Real" Optional="false">The bitmask data to set for the sound</Parameter>
</Function>
<Function Name="audio_emitter_velocity" Deprecated="false" ReturnType="Undefined" Pure="false">
<Description>This function can be used to give an emitter Doppler effects and simulate audio motion based on the vector that is resolved from the given relative x, y and z positions. If the emitter itself is not ever going to move you would normally not need to set these values, but, for example, if you are making a scrolling shooter game where the enemies come from the right and scroll to the left, you would set this to have a velocity of (hspeed, 0, 0) in the create event of the enemies (and update the emitter of each instance in the step event using audio_emitter_position()) to give any sounds emitted by the enemy instances the correct Doppler as they pass the player instance (which in turn would be using the function audio_listener_position() to set the listener to the correct position).</Description>
<Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to change.</Parameter>
<Parameter Name="vx" Type="Real" Optional="false">The x vector value (default 0).</Parameter>
<Parameter Name="vy" Type="Real" Optional="false">The y vector value (default 0).</Parameter>
<Parameter Name="vz" Type="Real" Optional="false">The z vector value (default 0).</Parameter>
</Function>
<Function Name="audio_play_sound_on" Deprecated="false" ReturnType="Id.Sound" Pure="false">
<Description>With this function you can play any sound asset through an emitter, with any changes to the emitter gain, position, pitch or velocity affecting how the user hears the final sound being played. You provide the emitter index to use, the sound index of the sound to be played and then specify whether the sound is to loop or not. Finally you can assign a priority, which is then used to determine how sounds are dealt with when the number of sounds