Version

    Other Documentation

menu_open
Wwise SDK 2018.1.11

◆ GetSpeakerAngles()

AKRESULT __cdecl AK::SoundEngine::GetSpeakerAngles ( AkReal32 io_pfSpeakerAngles,
AkUInt32 io_uNumAngles,
AkReal32 out_fHeightAngle,
AkOutputDeviceID  in_idOutput = 0 
)

Gets 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]. 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. You may call this function with io_pfSpeakerAngles set to NULL to get the expected number of angle values in io_uNumAngles, in order to allocate your array correctly. You may also obtain this number by calling AK::GetNumberOfAnglesForConfig( AK_SPEAKER_SETUP_DEFAULT_PLANE ). If io_pfSpeakerAngles is not NULL, the array is filled with up to io_uNumAngles. Typical usage:

  • AkUInt32 uNumAngles;
  • GetSpeakerAngles( NULL, uNumAngles, AkOutput_Main );
  • AkReal32 * pfSpeakerAngles = AkAlloca( uNumAngles * sizeof(AkReal32) );
  • GetSpeakerAngles( pfSpeakerAngles, uNumAngles, AkOutput_Main );
    Note: On most platforms, the angle set on the plane consists of 3 angles, to account for 7.1.
  • When panning to stereo (speaker mode, see AK::SoundEngine::SetPanningRule()), only angle[0] is used, and 3D sounds in the back of the listener are mirrored to the front.
  • When panning to 5.1, the front speakers use angle[0], and the surround speakers use (angle[2] - angle[1]) / 2.
Warning
Call this function only after the sound engine has been properly initialized.
Returns
AK_Success if device exists.
See also
SetSpeakerAngles()
Parameters
io_pfSpeakerAngles Returned array of loudspeaker pair angles, in degrees relative to azimuth [0,180]. Pass NULL to get the required size of the array.
io_uNumAngles Returned number of angles in io_pfSpeakerAngles, which is the minimum between the value that you pass in, and the number of angles corresponding to AK::GetNumberOfAnglesForConfig( AK_SPEAKER_SETUP_DEFAULT_PLANE ), or just the latter if io_pfSpeakerAngles is NULL.
out_fHeightAngle Elevation of the height layer, in degrees relative to the plane [-90,90].
in_idOutput Output 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