OnEventStopped only triggered when i quit PIE

Hey there,
I’m currently implementing our dialog system, which uses audiotables and Events to play programmer sounds that contain the voice lines.

    AudioComponent = GetOwner()->FindComponentByClass<UFMODAudioComponent>();
	if (AudioComponent) {
		AudioComponent->OnEventStopped.AddDynamic(this, &UDialogParticipantComponent::OnDialogLineEnded);
		AudioComponent->SetEvent(Event3D);
	}

That’s how I hook up the OnEventStopped to my dialog system.

And then I set up the ProgrammerSound and play it

void UDialogParticipantComponent::PlayProgrammerSound(FString& Name)
{
	AudioComponent->SetProgrammerSoundName(Name);
	AudioComponent->Play();
}

But the OnEventStopped function is never called. Only when I leave the play mode, it will execute the function.
Is my setup wrong?

Basically what my intention with this is:
Playing a single dialog line, which lies in a localized audio table. When the event/programmer sound finishes, call the next dialog line to be displayed and played through FMOD.

But so far I can’t find a way to hookup to the OnEventStopped callback. Does it have anything to do with our programmer instrument being async?

Alright! I figured it out!
We had sustain markers in our async events, because we thought our Programmer Sounds would otherwise not play for their full extents, but they appearently hindered the event (instance) from stopping properly.
When I deleted the sustain markers, the callback was fired again, and everything works as intended.

1 Like