AudiokineticのコミュニティQ&AはWwiseやStrataのコミュニティ内でユーザ同士が質問・回答をし合うことができるフォーラムです。Audiokineticテクニカルサポートチームからの回答をご希望の場合は、必ず サポートチケットページ をご利用ください。

Sink plugin - how to use SendPluginCustomGameData and GetPluginCustomGameData

0 支持

I am creating a sink plugin that needs custom data.

I have a simple console application with the following code to send some custom data:

/* Preceding initialisation*/

    MyCustomDataStruct myCustomData;
    const auto result = AK::SoundEngine::SendPluginCustomGameData(
        AK::BUSSES::MY_BUS,
        AK_INVALID_GAME_OBJECT,
        AkPluginTypeSink,
        MY_COMPANY_ID,
        MY_PLUGIN_ID,
        &myCustomData,
        sizeof(MyCustomDataStruct)); 

In my plugin MyAudioDeviceSink is derived from AK::IAkSinkPlugin:

void MyAudioDeviceSink::Consume(AkAudioBuffer* inputBuffer, AkRamp gain)
{
    void* myCustomData = nullptr;
    AkUInt32 size = 0;
    context->GetPluginCustomGameData(myCustomData, size);

/* rest of function */

}

SendPluginCustomGameData returns AK_Success, but I am finding that myCustomData is always null in my plugin. I must be missing something obvious but I can't see what I am doing wrong. Any suggestions? Is there 'custom data' example anywhere?

Julian (100 ポイント) 2023 5/24 質問 General Discussion

Please sign-in or register to answer this question.

...