Table of Contents

AKRESULT __cdecl AK::SoundEngine::AddSecondaryOutput ( AkUInt32  in_iOutputID,
AkAudioOutputType  in_iDeviceType,
AkUInt32  in_uListenerMask  
)

Adds a secondary output to the system. Use this to add controller-attached headphones or speakers. You can attach multiple devices to the same "player" if needed. Secondary output feature is supported only on WiiU (Controller-speaker), PS4 (Controller-speaker & BGM), XboxOne (Controller-headphone & BGM). Other platforms will return Ak_NotImplemented.

See also:
integrating_secondary_outputs
Returns:
  • AK_NotImplemented: Feature not supported on this platforms (all platforms except WiiU, PS4 and XBoxOne)
  • AK_InvalidParameter: Out of range parameters or unsupported parameter combinations (see parameter list below).
  • AK_Success: Parameters are valid.
Parameters:
in_iOutputID  Device identifier, when multiple devices of the same type are possible.
  • WiiU Controller-Speakers: 0 to 3 for Remotes, 0 for DRC.
  • PS4 Controller-Speakers: UserID as returned from sceUserServiceGetLoginUserIdList
  • XBoxOne Controller-Headphones: Use the AK::GetDeviceID function to get the ID from an IMMDevice. Find the player's device with the WASAPI API (IMMDeviceEnumerator, see Microsoft documentation) or use AK::GetDeviceIDFromName.
  • XBoxOne & PS4 BGM outputs: use 0.
in_iDeviceType  Device Type, must be one of the currently supported devices types. See AkAudioOutputType. - WiiU (Controller-speaker): Use AkOutput_DRC or AkOutput_Remote
  • PS4: Use AkOutput_PAD, AkOutput_Personal, AkOutput_BGM, AkOutput_BGM_NonRecordable
  • XboxOne Use AkOutput_BGM, AkOutput_BGM_NonRecordable, AkOutput_Personal
in_uListenerMask  Listener(s) to attach to this device. Everything heard by these listeners will be sent to this output. This is a bitmask. Avoid using listener 0, usually reserved for the main TV output.