版本

menu_open
Wwise SDK 2023.1.3

◆ GetWindowsDevice()

AKSOUNDENGINE_API bool AK::GetWindowsDevice ( AkInt32  in_index,
AkUInt32 out_uDeviceID,
IMMDevice **  out_ppDevice,
AkAudioDeviceState  uDeviceStateMask = AkDeviceState_All 
)

Get the Audio Endpoint for the specified device index. Call repeatedly with index starting at 0 and increasing to get all available devices, including disabled and unplugged devices, until the false is returned. You can also get the default device information by specifying index=-1. The default device is the one with a green checkmark in the Audio Playback Device panel in Windows. The returned out_uDeviceID parameter is the Device ID to use with Wwise. Use it to specify the main device in AkPlatformInitSettings.idAudioDevice. The returned out_ppDevice is a pointer to a pointer variable to which the method writes the address of the IMMDevice. out_ppDevice is optional; if it is null, then no action is taken. If the method returns false, *out_ppDevice is null and out_uDeviceID is AK_INVALID_DEVICE_ID. If the method successed, *out_ppDevice will be a counted reference to the interface, and the caller is responsible for releasing the interface when it is no longer needed, by calling Release(), or encapsulating the device in a COM Smart Pointer.

注解
CoInitialize must have been called for the calling thread. See Microsoft's documentation about CoInitialize for more details.
返回
Whether or not a device was found at the given index.
参数
in_indexIndex of the device in the array. -1 to get information on the default device.
out_uDeviceIDDevice ID for Wwise. This is the same as what is returned from AK::GetDeviceID and AK::GetDeviceIDFromName. Use it to specify the main device in AkPlatformInitSettings.idAudioDevice.
out_ppDevicepointer to a pointer variable to which the method writes the address of the IMMDevice in question.
uDeviceStateMaskOptional bitmask used to filter the device based on their state.

此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅