menu
バージョン
2017.1.9.6501
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
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
Wwise Authoring API は、AK::Wwise::IAudioPlugin::WaapiCall()
メソッドを使用して、Wwiseプラグインからリモート・プロシージャ・コールを発行するために使用できます。
info
|
Note: AK::Wwise::IAudioPlugin::WaapiCall() メソッドへの呼び出しは常にブロックされます。 |
ユーティリティクラスが提供されていますので、呼び出し側がメモリ割り当ての方策を提供できるようになります。AK::Wwise::Mallocator
は、malloc
とfree
を使ってデフォルト実装を提供していますが、カスタム実装はAK::IAkPluginMemAlloc
を実装するクラスを定義することで、簡単に提供することができます。最後に、タイプセーフと自動メモリ管理を確かにするために、ラッパークラスAK::Wwise::SafeAllocator
を使用します。
例:
#include <AK/Tools/Common/AkAllocator.h> #include <rapidjson/document.h> // Use the default allocation strategy for results and errors AK::Wwise::Mallocator alloc; AK::Wwise::SafeAllocator<char> szResults(&alloc); AK::Wwise::SafeAllocator<char> szError(&alloc); // Issue a remote procedure call to the Wwise Authoring API m_pPSet->WaapiCall("ak.wwise.core.getInfo", NULL, NULL, &alloc, szResults, szError); if (!szError) { // Parse the results JSON string rapidjson::Document results; results.Parse(szResults); // ... }
#include <AK/Tools/Common/AkAllocator.h> #include <rapidjson/document.h> #include <rapidjson/stringbuffer.h> #include <rapidjson/writer.h> // Use the default allocation strategy for results and errors AK::Wwise::Mallocator alloc; AK::Wwise::SafeAllocator<char> szResults(&alloc); AK::Wwise::SafeAllocator<char> szError(&alloc); // Build a JSON object that contains the procedure's parameters rapidjson::Document args; 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_pPSet->WaapiCall("ak.wwise.core.plugin.getProperty", buffer.GetString(), NULL, &alloc, szResults, szError); if (!szError) { // Parse the results JSON string rapidjson::Document results; results.Parse(szResults); // ... }
info
|
Note: ここでは、RapidJSON はデモンストレーション目的でのみ使用されており、決して必須ではありません。JSONを操作するのにあなたの選択したライブラリを使うことができます。 |
Wwiseプラグインに関する詳細は、Wwise プラグイン DLL の作成方法 をご覧ください。