버전

menu_open
Wwise SDK 2021.1.14

◆ GetCount

int(* ak_wwise_plugin_sink_devices_v1::GetCount) (const struct ak_wwise_plugin_sink_devices_instance_v1 *in_this)

Get a count of the number of interfaces currently available.

Provided by your plug-in, this should return a count.

Note: Due to the unpredictable nature of hardware configuration changes, an unpadded, basic system would return a configuration that can change between a GetCount and subsequent objects retrieval.

As a plug-in designer, you are responsible to address this by returning adequate values that make sense as a whole.

To guide you, Sink Devices interface is used for retrieval and data copy in a tight loop over a single thread at once. Host will retrieve the count, followed by the Name (GetName) and DeviceID (GetDeviceID), in the order the compiler sees fit. Data is expected to survive for the amount of time this tight loop exists.

int count = m_interface->GetCount(m_instance);
for (int i = 0; i < count; ++i)
{
result.emplace_back(
m_interface->GetName(m_instance, i),
m_interface->GetDeviceID(m_instance, i)
);
}

A proposal is to use GetCount to internally retrieve the device names and IDs, make a static internal cache, and then return name and device ID based on this cache.

You can also spawn an event listener or an update thread, and ensure the data is up to date when the calls come in, and block updates until all calls are accounted for.

Parameters
[in] in_this Current instance of this interface.
Returns
int Count of the number of interfaces available.

Definition at line 112 of file SinkDevices.h.

Referenced by AK.Wwise::Plugin::V1::SinkDevices::Interface::Interface().

ak_wwise_plugin_interface_type m_interface
Interface type (see ak_wwise_plugin_interface_type)

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요