Closed quantumlover closed 8 months ago
Hi, the reason for this behavior, where playback starts from 0 each time audio data is populated, is simply because you're calling the PlaySound2D
function every time after you call AppendAudioDataFromEncoded
. If you want to play it persistently as you receive your audio data, you should call the PlaySound2D
function only once, such as on Begin Play
, and then only call the AppendAudioDataFromEncoded
. This should resolve your issue.
Thank you very much. Looks like I was code blind. Your suggestion helped.
Hello everyone, nice to meet you 👋
I got an issue with audio streaming and it feels like I am stack. Spent around three days on that already.
I receive audio bytes from my python server using web sockets. After that I feed it to
Append Audio Data from Encoded
. Looks like it works as expected in general. But it keeps resetting my sound wave playback time to0
every time it receives new data. When it receives the last chunk it plays the whole message from the very start to the very end. I thought that maybe somehow I feed wrong data. But I am not sure.The error looks like that and I receive them every time I process new data chunk:
Even though I initialize
Streaming Sound Wave
at begin play event and set it to variable. Which I then reuse. I attached a screenshot with my blueprint logic. Any advice is appreciated as I am not sure what else to try. Thank you.