Meta_AudioTrack
Module: Metanodes / Definitions
An AudioTrack provides full control over playback and looping of data in a Meta_AudioBuffer. More...
#include <meta_audio.hpp>
Public Types
Type | Name |
---|---|
enum | IDX { Idx_AudioBuffer, Idx_State, Idx_Gain, Idx_Loop, Idx_Relative, Idx_RelativeTo, Idx_Directional } Property Index. |
enum | RelativeTo { World, Local } Values for Idx_RelativeTo. |
enum | State { Stopped, Playing, Paused } Values for Idx_State. |
Detailed Description
struct Meta_AudioTrack;
An AudioTrack provides full control over playback and looping of data in a Meta_AudioBuffer.
One sound source is allocated to this and is retained to prevent AudioSound interrupting it.
Public Types Documentation
enum IDX
Enumerator | Value | Description |
---|---|---|
Idx_AudioBuffer | link - Meta_AudioBuffer containing the audio data we want this sound to play | |
Idx_State | State (int) - The playback state of the track | |
Idx_Gain | float - Volume; 0.0 is silent, 1.0 is 100% volume, 2.0 is 200%. Clamped at 2.0. | |
Idx_Loop | bool - When true, track automatically restarts when it reaches the end. Otherwise, upon ending it enters the Stopped state. | |
Idx_Relative | bool - When true, positional audio is relative to the listener (i.e. Camera), otherwise it is positioned in its world location. | |
Idx_RelativeTo | RelativeTo (int) - For relative mode, whether to use the parent Assembly world or local transform. | |
Idx_Directional | Unused. |
Property Index.
enum RelativeTo
Enumerator | Value | Description |
---|---|---|
World | Use the parent assembly world transform to position the audio relative to the listener (Symbols - C: "RelativeToWorld" , Lua: __AudioTrack_RelativeToWorld ) | |
Local | Use the parent assembly local transform (Symbols - C: "RelativeToLocal" , Lua: __AudioTrack_RelativeToLocal ) |
Values for Idx_RelativeTo.
enum State
Enumerator | Value | Description |
---|---|---|
Stopped | Track is stopped and waiting at the beginning (Symbols - C: "Stopped" , Lua: __AudioTrack_Stopped ) | |
Playing | Track is playing (Symbols - C: "Playing" , Lua: __AudioTrack_Playing ) | |
Paused | Track is paused and will resume from the last playing location (Symbols - C: "Paused" , Lua: __AudioTrack_Paused ) |
Values for Idx_State.