Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

0 votes

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?

in General Discussion by Julian (100 points)
Did you find out an example of this? i'm trying to do a pretty similar thing

Please sign-in or register to answer this question.

...