#it's one-shot interface

1 messages · Page 1 of 1 (latest)

fiery palm
#

How was the audio component implemented?

ancient arch
#

Added to AActor on Level, and I send only one Meta Sound to it, then wait for it to finish.
And it works exellent in the engine, I get FOnAudioFinishedNative and FOnAudioPlayStateChangedNative and can catch the end of the sound by checking the AC->IsPlaying() on event tick.

But when i try it at development build, it's doesn't works anymore. In AC i have always one "ActiveCount" (AC return always IsPlaying as true), but in logs(au.Debug.Sounds) i see thats firstly have added my sound, and after it finish it's return 0 active sounds.

#

On some reason, engine don't decrease ActiveCount variable at build, and i don't undestand why, maybe it's bug, or i do something wrong.

fiery palm
#

Maybe you don't need AC?
There is a simpler solution for playing one-shot sounds.

ancient arch
fiery palm
fiery palm
lucid wind
#

Isn’t there an event bind to on audio finished?

whole belfry
#

Two things,

You MUST resolve that OnFinished node. The warning is there for a reason. It is used by the audio component to know when the MetaSouind is done.

You can remove that interface, but then you MUST manage the lifetime of your Audio component yourself.

David is correct, you can BindOnAudioFinished and that will send a dispatcher event. But this only works if your OnFinished is connected

whole belfry
#

If this is not working, it means you need to cache the audio component first.