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.

UE4 Crash in UAkAudioEvent Garbage Collection

0 votes
We have some looping sounds that we play via PostEventAtLocation.  It doesn't appear that the audio engine automatically stops these events on destruction.  When the event is destroyed, the streaming handle is freed, resulting in the sound data being freed from underneath the decoder thread, often resulting in a crash in the vorbis decoder.  I added this function to automatically stop playback when it's about to be destroyed, and it does not appear to crash anymore.

 

void UAkAudioEvent::BeginDestroy()
{
    if (auto* audioDevice = FAkAudioDevice::Get())
    {
        audioDevice->StopEventID(audioDevice->GetIDFromString(GetName()));
    }

    Super::BeginDestroy();
}

 

I'm new to wwise, but it seems correct to me.  Your thoughts?
asked Aug 4, 2020 in General Discussion by David B. (180 points)

Please sign-in or register to answer this question.

...