You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm facing this issue where the audio gets cut (~1 sec) at the end and can't figure out why it's happening. I hope someone can help me out here please!
Here's the code snippet (it's really just the sample code):
Troubleshooting 1:
I've tried to debug and step through the code, however during debugging, the full audio gets played fine and I don't see anything amiss throughout code stepping.
Troubleshooting 2:
I've also played the same file via VLC media player and the audio file was complete (no cut at the end).
Using a different audio file also results in audio getting cut at the end too.
Troubleshooting 3:
To narrow down the issue more, I did the following:
and the file write out complete without audio cut when played via VLC media player.
However when I change it to: ao.write(chunk);
the output audio gets trimmed at the end.
Troubleshooting 4:
I realized that changing the outOptions.maxQueue affects how much audio is being cut at the end. Setting to 1 and I get the longest audio play, setting it to 2 and it gets shortened more, 3 even more and so on. Setting it to 0 and no audio was played.
Troubleshooting 5:
I've also logged out the close event from the readstream and finish event from ao write stream,
it seems that the close event gets called, then the finish event and that's when the audio gets cut. It does not seem to wait for the audio to finish playing.
I hope someone can help me out with this! Thanks for your time!
The text was updated successfully, but these errors were encountered:
Hello all,
I'm facing this issue where the audio gets cut (~1 sec) at the end and can't figure out why it's happening. I hope someone can help me out here please!
Here's the code snippet (it's really just the sample code):
Troubleshooting 1:
I've tried to debug and step through the code, however during debugging, the full audio gets played fine and I don't see anything amiss throughout code stepping.
Troubleshooting 2:
I've also played the same file via VLC media player and the audio file was complete (no cut at the end).
Using a different audio file also results in audio getting cut at the end too.
Troubleshooting 3:
To narrow down the issue more, I did the following:
and the file write out complete without audio cut when played via VLC media player.
However when I change it to:
ao.write(chunk);
the output audio gets trimmed at the end.
Troubleshooting 4:
I realized that changing the
outOptions.maxQueue
affects how much audio is being cut at the end. Setting to 1 and I get the longest audio play, setting it to 2 and it gets shortened more, 3 even more and so on. Setting it to 0 and no audio was played.Troubleshooting 5:
I've also logged out the
close
event from the readstream andfinish
event fromao
write stream,it seems that the
close
event gets called, then thefinish
event and that's when the audio gets cut. It does not seem to wait for the audio to finish playing.I hope someone can help me out with this! Thanks for your time!
The text was updated successfully, but these errors were encountered: