Home

2024

Worklog

LETSGO Game

Fix crashes, debug PlayQuantize

Date
August 29, 2024
Hours
1.25
Tags
UnrealCodeC++LETSGO

Continuing on from yesterday, I figured out the bad memory access issues caused by the refactor work.

Everything appears to be working, except there seems to be a weird interaction between PlayQuantized and SetWaveParameter within the AudioCuePlayer’s AudioComponent.

Basically the problem is the sound is triggering, but it sounds as if its not being played on the audio thread- every sound is clipped/barely audible.

There seemed to be some overlap with this discussion:

Setting Metasounds Variable - Development / Audio - Epic Developer Community Forums (unrealengine.com)

But I’m confused as to what the actual problem here is. From the sounds I’m hearing, as well as debug session, I can tell that the sound wave is being properly assigned to the Metasound.

At least, everything that I can peer into from debugger makes it look that way- I can’t actually peer into the instance of the Metasound itself anywhere.

I’ve tried moving around the initialization of the metasound parameters- during the AudioCuePlayer initialiation, in PlayAndDestroy(), after PlayQuantized. But there’s no behavior change regardless of where I put it. I even commented out the set parameter function to check if it was being unused.

But it is setting the sounds, removing it makes no sound play, which would be expected.

So, I need to figure out how to set the input parameters of a MetaSound when using PlayQuantized. I’m doubting the Unreal Community Discord will be able to help with this, might have to be a forum post- but I’m expecting zero responses.