MetaSound bug? need to start, stop, and start a metasound

It seems playing, stopping, and playing a Metasound is impossible to do. It will only play one time, then after you stop it, it cannot be played again.

To reproduce the behavior:
Create a new metasound object with a wave player that has an input trigger for Play, and an input trigger for Stop. Create a new actor blueprint, add an audio component, set the Sound to the metasound you made, and make a function to play the metasound and one to stop the metasound, then place the actor in the world (either using the metasound instance > GetParameterInterface > Trigger, or by just using the standard Play/Stop functions for audio components).

Now try to play it, stop it, then play it again. The first play and stop will work fine, the second time you play it, nothing happens.

It works fine when your audio component is using a sound cue, but not a metasound.

Is this a bug?

3 Likes

Bump. I’m having the same issue.

2 Likes

I was able to get the sound to play again by adding a “Play” Audio Component node to the actor blueprint that plays the metasound. Specifically, I added it before triggering the input parameter.

Here, the “Sound” node is a reference to an Audio Component on the actor, which is set to the metasound described by the graph below.

Where “TriggerPlay” is a custom input I created for the metasound

5 Likes

@josiest is right his answer is correct! I want to add that If you have multiple “deactivate” nodes and “activate” (for a specific audio component) along with “play” “Stop” or “execute parameter” make sure after activating you use the delay node for at least 0.1 seconds only in the situation of you not be able to hear your sound playing but with print string isPlaying says that it is playing (this should fix it).

Like this.


Thanks for sharing, this works! But I really don’t like that delay node… It feels like there should be a better way

1 Like

I am not sure why this is happening - might it be that you use ,Auto Destroy" on the sound when you spawn it into the world and therefore it is destroying itself before you ask it to play again? This is just an idea… :smiley: maybe this is not the problem. But if you dont like the delay thing - maybe you can play ths sound using Quartz… Dan Reynolds has good explanations for that on youtube here: Rough Introduction To Quartz Unreal Engine Subsystem (UE4.26) - YouTube nad about quartz: Explaining That Quartz Is A Scheduling System To Resolve MultiThreaded Timing Issues - YouTube

1 Like

Doesn’t work for me AT ALL. ■■■■

Thx this helped me out a lot. I tried adding play after dynamically creating the audio component and assigning a meta sound to it, but that didn’t work. Only when I add it in chain with the trigger, it’ll work.