버전

menu_open
Wwise SDK 2023.1.3
Using the Wwise 플러그인에서의 Wwise Authoring API

원격 프로시저 호출하기

The Wwise Authoring API can be used to issue remote procedure calls from within a Wwise plug-in using the AK::Wwise::Plugin::Host::WaapiCall() method. This method is provided by the Host component, which you can request by inheriting from AK::Wwise::Plugin::RequestHost.

참고: Calls to the AK::Wwise::Plugin::Host::WaapiCall() method are always blocking.

호출자가 메모리 할당 전략을 수립할 수 있게 유틸리티 클래스가 제공됩니다. AK::Wwise::Mallocator offers a default implementation using functions from the C library, such as malloc, free and realloc. A custom strategy can easily be provided by defining a class that implements AK::IAkPluginMemAlloc. Finally, a wrapper class AK::Wwise::SafeAllocator is used to ensure type-safety and automatic memory management.

예시:

#include <rapidjson/document.h>
// 결과와 오류에 대해 기본 할당 계획을 사용
// Wwise Authoring API에 원격 프로시저 호출
m_host.WaapiCall("ak.wwise.core.getInfo", NULL, NULL, alloc, szResults, szError);
if (!szError)
{
// Parse the results JSON string
results.Parse(szResults);
// ...
}
#include <rapidjson/document.h>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/writer.h>
// 결과와 오류에 대해 기본 할당 계획을 사용
// 프로시저의 매개 변수를 포함하고 있는 JSON 객체를 빌드
args.SetObject();
args.AddMember("classId", 8192003, args.GetAllocator());
args.AddMember("property", "ModDepth", args.GetAllocator());
// JSON 객체를 문자열로 나타냄
rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
args.Accept(writer);
// Wwise Authoring API에 원격 프로시저 호출
m_host.WaapiCall("ak.wwise.core.plugin.getProperty", buffer.GetString(), NULL, alloc, szResults, szError);
if (!szError)
{
// Parse the results JSON string
results.Parse(szResults);
// ...
}
참고: 여기서 RapidJSON은 예제를 보여주기 위한 용도로만 사용됐으며 반드시 사용해야 할 필요는 없습니다.

Wwise 플러그인에 대한 더 많은 정보는 플러그인 라이브러리 형식 저작하기 를 참고하세요.

#define NULL
Definition: AkTypes.h:46

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

지원이 필요하신가요?

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

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

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

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

Wwise를 시작해 보세요