System::get3DListenerAttributes

FMOD Studio API

Firelight Technologies FMOD Studio API

System::get3DListenerAttributes

This retrieves the position, velocity and orientation of the specified 3D sound listener.

C++ Syntax

FMOD_RESULT System::get3DListenerAttributes(
  int listener,
  FMOD_VECTOR *pos,
  FMOD_VECTOR *vel,
  FMOD_VECTOR *forward,
  FMOD_VECTOR *up
);

C Syntax

FMOD_RESULT FMOD_System_Get3DListenerAttributes(
  FMOD_SYSTEM *system,
  int listener,
  FMOD_VECTOR *pos,
  FMOD_VECTOR *vel,
  FMOD_VECTOR *forward,
  FMOD_VECTOR *up
);

C# Syntax

RESULT System.get3DListenerAttributes(
  int listener,
  out VECTOR pos,
  out VECTOR vel,
  out VECTOR forward,
  out VECTOR up
);

JavaScript Syntax

System.get3DListenerAttributes(
  listener,                        
  pos,                             // writes value to pos.val
  vel,                             // writes value to vel.val
  forward,                         // writes value to forward.val
  up                               // writes value to up.val
);

Parameters

listener
Listener ID in a multi-listener environment. Specify 0 if there is only 1 listener.
pos
Address of a variable that receives the position of the listener in world space, measured in distance units. Optional. Specify 0 or NULL to ignore.
vel
Address of a variable that receives the velocity of the listener measured in distance units per second. Optional. Specify 0 or NULL to ignore.
forward
Address of a variable that receives the forwards orientation of the listener. Optional. Specify 0 or NULL to ignore.
up
Address of a variable that receives the upwards orientation of the listener. Optional. Specify 0 or NULL to ignore.

Return Values

If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.

Remarks

NOTE! Users of the Studio API should call Studio::System::getListenerAttributes instead of this function.

See Also




Version 1.10.03 Built on Feb 1, 2018