menu
 
バージョン
2024.1.4.8780

2024.1.4.8780

2023.1.12.8706

2022.1.18.8567

2021.1.14.8108

2019.2.15.7667

2019.1.11.7296

2018.1.11.6987

2017.2.10.6745

2017.1.9.6501

2016.2.6.6153

2015.1.9.5624


menu_open
Wwise SDK 2024.1.4
Wwise プラグインでWwise Authoring APIを使用する

リモート・プロシージャの呼び出し

Wwise Authoring API は、AK::Wwise::Plugin::Host::WaapiCall() メソッドを使用して、Wwiseプラグインからリモート・プロシージャ・コールを発行するために使用できます。 このメソッドはHostコンポーネントによって提供され、 AK::Wwise::Plugin::RequestHost から継承することでこれをリクエストできます。

info注釈: AK::Wwise::Plugin::Host::WaapiCall()メソッドへの呼び出しは常にブロックされます。

ユーティリティクラスが提供されていますので、呼び出し側がメモリ割り当ての方策を提供できるようになります。AK::Wwise::Mallocator は、 mallocfreerealloc などCライブラリの関数を使ったデフォルトの実装を提供します。 AK::IAkPluginMemAlloc を実装するクラスを定義することで、カスタムストラテジーを簡単に提供できます。最後に、タイプセーフと自動メモリ管理を確かにするために、ラッパークラスAK::Wwise::SafeAllocatorを使用します。

例:

#include <rapidjson/document.h>
// Use the default allocation strategy for results and errors
// Issue a remote procedure call to the 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>
// Use the default allocation strategy for results and errors
// Build a JSON object that contains the procedure's parameters
args.SetObject();
args.AddMember("classId", 8192003, args.GetAllocator());
args.AddMember("property", "ModDepth", args.GetAllocator());
// Stringify the JSON object
rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
args.Accept(writer);
// Issue a remote procedure call to the 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);
// ...
}
info注釈: ここでは、RapidJSON はデモンストレーション目的でのみ使用されており、決して必須ではありません。

Wwiseプラグインに関する詳細は、Authoring Plug-in Library Format をご覧ください。

#define NULL
Definition: AkTypes.h:46

このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう