版本

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.

参见:
integrating_secondary_outputs
返回:
  • 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.
参数:
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.
参见:
AkAudioOutputFlags
参数:
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()

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅