UNPKG

@bscotch/gml-parser

Version:

A parser for GML (GameMaker Language) files for programmatic manipulation and analysis of GameMaker projects.

530 lines (510 loc) 1.47 MB
<?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. 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.</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.</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_or_ref" Type="String,Asset" Optional="false">The name of or a reference to 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.</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.</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.</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.</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.</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.</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.</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.</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.</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.</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">A constant specifying the channels to use.</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.</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.</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.</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.</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().</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.</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()).</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.</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).</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.</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.</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.</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.</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.</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.</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 (the default position is (0, 0, 0)).</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.</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.</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.</Description> <Parameter Name="emitter" Type="Id.AudioEmitter" Optional="false">The index of the emitter to use.</Parameter> <Parameter Name="sound" Type="Asset.GMSound" Optional="false">The index of the sound to use.</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_group_is_loaded" Deprecated="false" ReturnType="Bool" Pure="true"> <Description>This function will check a specific audio group to see if it has been loaded into memory, ready for use.</Description> <Parameter Name="groupid" Type="Asset.GMAudioGroup" Optional="false">The index of the audio group to check (as defined in the Audio Groups Window)</Parameter> </Function> <Function Name="audio_group_load" Deprecated="false" ReturnType="Bool" Pure="false"> <Description>This function will load all the sounds that are flagged as belonging to the given Audio Group into memory.</Description> <Parameter Name="groupid" Type="Asset.GMAudioGroup" Optional="false">The index of the audio group to load (as defined in the Audio Groups Window)</Parameter> </Function> <Function Name="audio_group_load_progress" Deprecated="false" ReturnType="Real" Pure="true"> <Description>This function will check the loading progress for an audio group and return an (approximate) value between 0 and 100.</Description> <Parameter Name="groupid" Type="Asset.GMAudioGroup" Optional="false">The index of the audio group to check (as defined in the Audio Groups Window)</Parameter> </Function> <Function Name="audio_group_name" Deprecated="false" ReturnType="String" Pure="true"> <Description>This function will return a string containing the name of the given audio group for displaying or checking.</Description> <Parameter Name="groupid" Type="Asset.GMAudioGroup" Optional="false">The index value constant of the audio group to check (as defined in the Audio Groups Window)</Parameter> </Function> <Function Name="audio_group_set_gain" Deprecated="false" ReturnType="Undefined" Pure="false"> <Description>With this function you can fade a group of sounds in or out over a given length of time, or it can be used to set the group gain instantly. The time is measured in milliseconds, and the function requires that you input a final level of gain for the group to have reached by the end of that time. This gain can be between 0 (silent) and 1 (full volume) and the scale is linear.</Description> <Parameter Name="groupid" Type="Asset.GMAudioGroup" Optional="false">The index of the audio group to stop (as defined in the Audio Groups Window)</Parameter> <Parameter Name="volume" Type="Real" Optional="false">The final value for the group volume.</Parameter> <Parameter Name="time" Type="Real" Optional="true">The length of the change in gain in milliseconds.</Parameter> </Function> <Function Name="audio_group_get_gain" Deprecated="false" ReturnType="Real" Pure="true"> <Description>This function will return the group gain of a given audio group.</Description> <Parameter Name="groupid" Type="Asset.GMAudioGroup" Optional="false">The index of the audio group to check (as defined in the Audio Groups window)</Parameter> </Function> <Function Name="audio_group_stop_all" Deprecated="false" ReturnType="Undefined" Pure="false"> <Description>This function will stop all sounds from the given audio group that are currently playing.</Description> <Parameter Name="groupid" Type="Asset.GMAudioGroup" Optional="false">The index of the audio group to stop (as defined in the Audio Groups Window)</Parameter> </Function> <Function Name="audio_group_unload" Deprecated="false" ReturnType="Bool" Pure="false"> <Description>This function will unload all the sounds that are flagged as belonging to the given Audio Group into memory. Note that any audio currently being played when this function is called will be stopped.</Description> <Parameter Name="groupid" Type="Asset.GMAudioGroup" Optional="false">The index of the audio group to unload (as defined in the Audio Groups Window)</Parameter> </Function> <Function Name="audio_group_get_assets" Deprecated="false" ReturnType="Array[Asset.GMSound]" Pure="true"> <Description>This function will return an array containing the asset index of each audio asset in the given audio group.</Description> <Parameter Name="group_index" Type="Asset.GMAudioGroup" Optional="false">The index of the audio group whose asset indices should be retrieved.</Parameter> </Function> <Function Name="audio_sound_get_audio_group" Deprecated="false" ReturnType="Asset.GMAudioGroup" Pure="true"> <Description>This function will return the index of the audio group that is associated with the given sound index.</Description> <Parameter Name="sound_index" Type="Asset.GMSound,Id.Sound" Optional="false">The index of the sound whose audio group should be retrieved.</Parameter> </Function> <Function Name="audio_get_listener_count" Deprecated="false" ReturnType="Real" Pure="true"> <Description>Certain target platforms permit more than one listener, so it is important that you know how many the target has before changing or using different listeners. This function will return the number of listeners available.</Description> </Function> <Function Name="audio_get_listener_info" Deprecated="false" ReturnType="Id.DsMap" Pure="true"> <Description>This function will create a DS map and populate it with information for the given listener.</Description> <Parameter Name="num" Type="Real" Optional="false">The listener number to get the data for.</Parameter> </Function> <Function Name="audio_get_listener_mask" Deprecated="false" ReturnType="Real" Pure="true"> <Description>This function will return the bit-mask data that defines the current default (global) mask for the audio listeners.</Description> </Function> <Function Name="audio_listener_get_data" Deprecated="false" ReturnType="Id.DsMap" Pure="true"> <Description>This function will create a DS map and populate it with the position, velocity and orientation values for the given 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. If you provide an incorrect listener index then the function will return -1.</Description> <Parameter Name="index" Type="Real" Optional="false">The listener to get the data for (default 0).</Parameter> </Function> <Function Name="audio_listener_orientation" Deprecated="false" ReturnType="Undefined" Pure="false"> <Description>With this function you can change the orientation of the listener within the 3D audio space. The look at direction and up direction are based on the vectors that are resolved from the given relative x, y and z positions, and default to (0, 0, 1000) for the look at direction and (0, 1, 0) for the up direction.</Description> <Parameter Name="lookat_x" Type="Real" Optional="false">The x look vector (default 0).</Parameter> <Parameter Name="lookat_y" Type="Real" Optional="false">The y look vector (default 0).</Parameter> <Parameter Name="lookat_z" Type="Real" Optional="false">The z look vector (default 1000).</Parameter> <Parameter Name="up_x" Type="Real" Optional="false">The x up vector (default 0).</Parameter> <Parameter Name="up_y" Type="Real" Optional="false">The y up vector (default 1).</Parameter> <Parameter Name="up_z" Type="Real" Optional="false">The z up vector (default 0).</Parameter> </Function> <Function Name="audio_listener_position" Deprecated="false" ReturnType="Undefined" Pure="false"> <Description>With this function you can change the position of the listener within the 3D audio space.</Description> <Parameter Name="x" Type="Real" Optional="false">The x position of the listener (default 0).</Parameter> <Parameter Name="y" Type="Real" Optional="false">The y position of the listener (default 0).</Parameter> <Parameter Name="z" Type="Real" Optional="false">The z position of the listener (default 0).</Parameter> </Function> <Function Name="audio_listener_set_orientation" Deprecated="false" ReturnType="Undefined" Pure="false"> <Description>With this function you can change the orientation of the given listener within the 3D audio space. 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.</Description> <Parameter Name="index" Type="Real" Optional="false">The listener to set the orientation of.</Parameter> <Parameter Name="lookat_x" Type="Real" Optional="false">The x look vector (default 0).</Parameter> <Parameter Name="lookat_y" Type="Real" Optional="false">The y look vector (default 0).</Parameter> <Parameter Name="lookat_z" Type="Real" Optional="false">The z look vector (default -1).</Parameter>