GCubeSDK
©2026 FenixFox®Studios

AudioListener

AudioListener ⟵ Object3D

Virtual listener for all positional and non-positional audio in the scene.
An application usually creates one listener. Audio and AudioEmitter require this object as a constructor parameter. In most cases, add the listener as a child of the camera. The camera transform then defines the listener transform.

InheritanceDiagram node_AudioListener AudioListener node_Object3D Object3D node_Object3D->node_AudioListener

Methods

AudioListener()

Default constructor - creates a listener

virtual AudioListener* clone(bool recursive) const override

Creates a copy of this listener

recursive Whether to clone all child objects as well true

virtual void copy(const Object3D& object, bool recursive) override

Copies properties from another object

object Source object to copy from
recursive Whether to copy all child objects as well true

void update(f32 deltaTime)

Updates listener time delta and world transform

deltaTime Elapsed time since last frame in seconds 0.0f

f32 getMasterVolume() const

Returns the application master volume

AudioListener* setMasterVolume(f32 value)

Sets the application master volume. This volume affects all audio nodes

value Master volume in the range 0.0 to 1.0

Properties

isAudioListener bool Read
masterVolume f32 Master volume (0.0 to 1.0)
timeDelta f32 Time delta of the last update in seconds