Version

menu_open
AKRESULT __cdecl AK::SoundEngine::AddSecondaryOutput ( AkUInt32  in_iOutputID,
AkAudioOutputType  in_iDeviceType,
const AkGameObjectID in_pListenerIDs,
AkUInt32  in_uNumListeners,
AkUInt32  in_uOutputFlags = 0,
AkUniqueID  in_audioDeviceShareset = AK_INVALID_UNIQUE_ID  
)

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 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 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.
  • 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.
  • Audio device plugins: use 0 to X
in_iDeviceType  Device Type, must be one of the currently supported devices types. See AkAudioOutputType. - PS4: Use AkOutput_PAD, AkOutput_Personal, AkOutput_BGM, AkOutput_BGM_NonRecordable
  • XboxOne Use AkOutput_BGM, AkOutput_BGM_NonRecordable, AkOutput_Personal
  • If you are using an Audio Device plug-in, you must specify AkOutput_Plugin.
in_pListenerIDs  - Listener(s) to attach to this device. Everything heard by these listeners will be sent to this output. Avoid using listenerID 0, usually reserved for the main TV output.
in_uNumListeners  - The number of elements in the in_pListenerIDs array.
in_uOutputFlags  Optional Flags that will be passed to the secondary output creation, OR-it to pass many flags.
See also:
AkAudioOutputFlags
Parameters:
in_audioDeviceShareset  Unique ID of a custom audio device to be used. Leave this field to its default value (AK_INVALID_UNIQUE_ID) unless you are using an Audio device plug-in. Typical usage: audioDeviceShareset = AK::SoundEngine::GetIDFromString("InsertYourAudioDeviceSharesetNameHere"); AK::SoundEngine::GetIDFromString()

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