![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IListener graph node interface.
A listener represents a node positioned in world space that is "listening" to any sound sources (e.g. IAudioSequence nodes) within its hearing range. All captured sources are attenuated according to their distance and given parameters, and mixed together afterwards.
See sceneGraphStatesSlotsUnits for an overview of state handling during scene graph traversal.
See Graph::IListenerTransform for setting a listener's position and orientation. See Graph::IListenerState for activating a listener for rendering.
Gain calculation formula:
REFERENCE_DISTANCE = referenceDistance attribute from IPlayable
ROLLOFF_FACTOR = rolloffFactor attribute from IPlayable
MAX_DISTANCE = maxDistance attribute from IPlayable
Get the constant INode interface. This method returns a constant pointer to the node's INode interface, to be able to query common node properties such as active state, visibility or ID.
Murl.Graph.INode GetNodeInterface()
Get the constant ISubject interface. This method returns a constant pointer to the node's ISubject interface, to be able to query subject properties such as world transform, viewing matrix, projection matrix etc.
Murl.Graph.ISubject GetSubjectInterface()
Get the constant IViewNodeTarget container. This method returns a constant pointer to the node's IViewNodeTarget container, which allows to query the view object the listener is attached to.
Murl.Graph.IGenericNodeTarget.GraphIView GetViewNodeTarget()
Set the listener's volume (gain).
Boolean SetVolume(Number volume)
volume | The overall volume. |
Get the listener's volume (gain).
Number GetVolume()
Set the maximum hearing distance.
Boolean SetMaxDistance(Number maxDistance)
maxDistance | The maximum distance. |
Get the maximum hearing distance.
Number GetMaxDistance()
Set the listener's distance model used for attenuation calculation.
Boolean SetDistanceModel(Murl.IEnums.DistanceModel distanceModel)
distanceModel | The distance model to use. |
Get the listener's distance model used for attenuation calculation.
Murl.IEnums.DistanceModel GetDistanceModel()
Get the listener's number of stages.
Integer GetNumberOfStages()