버전
menu

Wwise SDK 2019.2.15
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::IPluginPropertySet::WaapiCall() method.

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

호출자가 메모리 할당 전략을 수립할 수 있게 유틸리티 클래스가 제공됩니다. AK::Wwise::Mallocator 에는 mallocfree를 이용한 기본 구현이 있습니다. 그러나 AK::IAkPluginMemAlloc을 구현하는 클래스를 정의하면 쉽게 사용자 지정을 구현할 수 있습니다. 마지막으로, 래퍼 클래스 AK::Wwise::SafeAllocator는 타입에 안정성을 보장하며 오류 방지 및 자동화된 메모리 관리에 사용됩니다.

예시:

#include <rapidjson/document.h>
// 결과와 오류에 대해 기본 할당 계획을 사용
AK::Wwise::SafeAllocator<char> szResults(&alloc);
// Wwise Authoring API에 원격 프로시저 호출
m_pPSet->WaapiCall("ak.wwise.core.getInfo", NULL, NULL, &alloc, szResults, szError);
if (!szError)
{
// 결과물을 JSON 문자열로 파싱함
rapidjson::Document results;
results.Parse(szResults);
// ...
}
#include <rapidjson/document.h>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/writer.h>
// 결과와 오류에 대해 기본 할당 계획을 사용
AK::Wwise::SafeAllocator<char> szResults(&alloc);
// 프로시저의 매개 변수를 포함하고 있는 JSON 객체를 빌드
rapidjson::Document args;
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_pPSet->WaapiCall("ak.wwise.core.plugin.getProperty", buffer.GetString(), NULL, &alloc, szResults, szError);
if (!szError)
{
// 결과물을 JSON 문자열로 파싱함
rapidjson::Document results;
results.Parse(szResults);
// ...
}
참고: 여기서 RapidJSON은 예제를 보여주기 위한 용도로만 사용됐으며 반드시 사용해야 할 필요는 없습니다.

Wwise 플러그인에 대한 더 많은 정보는 How to Create a Wwise Plug-in DLL 를 참고하세요.

#define NULL
Definition: AkTypes.h:49

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

지원이 필요하신가요?

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

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

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

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

Wwise를 시작해 보세요