Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound went silent when segment looped in Metasound #81

Open
IskandarAlex2 opened this issue Sep 29, 2024 · 11 comments
Open

Sound went silent when segment looped in Metasound #81

IskandarAlex2 opened this issue Sep 29, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@IskandarAlex2
Copy link

IskandarAlex2 commented Sep 29, 2024

The imported sound went silent when it looped with the beginning loop time set. The output is there so I can track playback time, with and without it the same issue still occurs. This is on my windows machine so if anything this is not just Linux like last time with my past issue here

image

Here's a video to demonstrate the issue
https://github.com/user-attachments/assets/71a6c31a-561c-4e0f-92d1-18a0aadd4600

@gtreshchev gtreshchev added the bug Something isn't working label Sep 29, 2024
@gtreshchev
Copy link
Owner

In my experiments I wasn't able to get it working with the regular sound wave, so after the Stop command is executed, the Play command can't be executed again for some reason. Also, the PlaybackTime isn't broadcasting after the Stop is triggered, even after the second Start. I was testing on UE 5.4. Can you please provide additional context regarding the UE version and more BP nodes?

@IskandarAlex2
Copy link
Author

Latest - UE5.4.4
image
image

and yes, the loop segment works as usual with regular sound waves, only imported sound waves face this randomly silenced issue.

@IskandarAlex2
Copy link
Author

I made a test between regular wave asset and RAI import (of the same source file)
same node other than I changed the loop segment begin and duration time for this one song

regular.vs.RAI.mp4

@gtreshchev
Copy link
Owner

You should make sure that the sound wave isn't garbage collected prematurely by assigning it to a separate variable in Blueprints so that it's treated as a hard reference.

Also, how exactly are you stopping the playback? Are you calling the Stop trigger via ExecuteTriggerParameter and then playing it again using the Play function from the audio component or ExecuteTriggerParameter with OnPlay?

@IskandarAlex2
Copy link
Author

I don't use the stop trigger for this. At all, it is there for the main purpose but it is not used during the experiment I made. I also did try to make the imported wave as a hard reference variable in the blueprint but the same thing still occurs

@gtreshchev
Copy link
Owner

Hmm so how do you stop the sound then?

@IskandarAlex2
Copy link
Author

This thing's main purpose includes calling that "stop" trigger input. But right now, the issue isn't that, it's the Metasound wave player went silent when it is supposed to loop the playing wave.
From the video of my testing, the looping works perfectly with regular sound wave asset but went completely silent when looped with imported sound wave

@IskandarAlex2
Copy link
Author

I use a workaround by tracking the playback time manually and replaying it with the beginning loop as the start time.
I would not consider this as resolved because the plugin failed to support Metasound's wave player node feature.

@gtreshchev
Copy link
Owner

Hmm, maybe the loop in the wave player requires some virtual function to be implemented for it to work with the wave asset, or perhaps some property needs to be filled. I'll need to look into it over the weekend

@aescapes
Copy link

aescapes commented Oct 9, 2024

Not sure if this is helpful but this could be related to the issue. The WavePlayer's loop start time seems to be the problem when using the importer. It's not that it's not looping but it's looping to the wrong part of the audio (seemingly often twice later than what is set or something). The non-audio outputs of the WavePlayer seem to work as expected as does the Loop Duration input. The silence could be caused by it looping to a point where there's no more audio left.

Happens to me in UE 5.4.3. Works fine in 5.3.x

@aescapes
Copy link

The looping error amount seems to correlate with the audio channel amount. Mono audio seems to work. Stereo audio seems to double the loop start point. With 6-channel audio (5.1 surround), the loop start point seems to be 6 times the input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants