Search

Home

2025

2024

Worklog

LETSGO Game

Troll through Unreal Engine code

Date
September 3, 2024
Hours
1
Tags
ResearchCodeUnrealLETSGO
AudioComponent SetWaveParameter with PlayQuantized

I have an actor that plays AudioComponent->PlayQuantized() Previously the actor would be initialized with a unique Metasound. On PlayQuantized() it would work as expected. This approach required me to instrument many Metasounds, and instead I’d like to use a single MetasoundSource* that has parameterized inputs. However, now when I run AudioComponent->SetWaveParameter I get unexpected behavior: Audio is being played as if not in the quantization audio thread- sounds are clipped, barely audibl...

AudioComponent SetWaveParameter with PlayQuantized

Did a tumble down the AudioComponent rabbit-hole, trying to assemble some rudimentary understanding of where the SetWaveParameter failure may be happening.

Although it’s not really a failure on the SetWaveParameter. As I can here the sound is assigned. It’s that the PlayQuantized bit sounds incorrect.

Anyways, I did successfully tumble down the stack. Had to make some logical leaps here or there but I think I have some understanding of how the AudioComponent plays.

I also feel like MetaSounds are just fancy wrappers around AudioComponents? At least, I don’t think MetaSounds are the the thing playing the sound. I think its a controller backing into AudioComponent.

Anyways, here’s my current list of next steps:

  1. Experiment to see if SetWaveParameter correctly when not playing the sound via PlayQuantized
  2. Continue investigating FAudioParameter, try and understand what this Merging stuff is.
  3. See if there’s a programmatic way to duplicate MetaSounds at runtime, directly assigning the SoundWave I’d otherwise use.
  4. See if I can use SoundCue’s rather than waves?
  5. Abandon all hope, revert this entire set of changes and just use 50 MetaSounds with direct soundwave assignment. Kind of defeats the purpose of MetaSounds, and forces me to do the equivalent by hand.
  6. See if there’s a way to submit this behavior as a bug. It feels like PlayQuantized and SetWaveParameter should work more-or-less out of the box.