Wwise SDK 2023.1.5

◆ SetSpeakerAngles()

AKSOUNDENGINE_API AKRESULT AK::SoundEngine::SetSpeakerAngles ( const AkReal32 in_pfSpeakerAngles,
AkUInt32  in_uNumAngles,
AkReal32  in_fHeightAngle,
AkOutputDeviceID  in_idOutput = 0 

Sets speaker angles of the specified device. Speaker angles are used for 3D positioning of sounds over standard configurations. Note that the current version of Wwise only supports positioning on the plane. The speaker angles are expressed as an array of loudspeaker pairs, in degrees, relative to azimuth ]0,180], for a 7.1 speaker configuration. Supported loudspeaker setups are always symmetric; the center speaker is always in the middle and thus not specified by angles. Angles must be set in ascending order. Note:

  • This function requires the minimum speaker angle between any pair of speakers to be at least 5 degrees.
  • When setting angles for a 5.1 speaker layout, we recommend that you select an angle for the SL and SR channels, then subtract 15 degrees for in_pfSpeakerAngles[1] and add 15 degrees for in_pfSpeakerAngles[2] to set the arc appropriately.

Typical usage:

  • Initialize the sound engine and/or add secondary output(s).
  • Get number of speaker angles and their value into an array using GetSpeakerAngles().
  • Modify the angles and call SetSpeakerAngles(). This function posts a message to the audio thread through the command queue, so it is thread safe. However the result may not be immediately read with GetSpeakerAngles().
    This function only applies to configurations (or subset of these configurations) that are standard and whose speakers are on the plane (2D).
  • AK_Success if successful.
  • AK_InvalidFloatValue if the value specified was NaN or Inf
  • AK_InsufficientMemory if there wasn't enough memory in the message queue
  • AK_InvalidParameter one of the parameter is invalid, check the debug log.
    See also
in_pfSpeakerAnglesArray of loudspeaker pair angles, in degrees relative to azimuth [0,180].
in_uNumAnglesNumber of elements in in_pfSpeakerAngles. It must correspond to AK::GetNumberOfAnglesForConfig( AK_SPEAKER_SETUP_DEFAULT_PLANE ) (the value returned by GetSpeakerAngles()).
in_fHeightAngleElevation of the height layer, in degrees relative to the plane [-90,90].
in_idOutputOutput ID to set the bus on. As returned from AddOutput or GetOutputID. You can pass 0 for the main (default) output

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise