CC: Tweaked

CC: Tweaked

57M Downloads

speakers.playAudio sometimes plays only on the next call

EntityinArray opened this issue ยท 1 comments

commented

Minecraft Version

1.21.x

Version

1.111.1

Details

Hello, thank you for your work on this amazing mod.

I discovered a weird issue with speakers. Executing speakers.playAudio() with certain timing has a chance to not play sound at all. The audio chunk gets postponed until next function call, at which speakers play 2 chunks one after another.

(speaker is driven properly, waiting for speaker_audio_empty e.t.c., just like in the wiki)
https://pastebin.com/2UDbQaZD

Video that demonstrates the issue:

speaker_stuff.mp4
commented

I also tried changing chunk length from 16000 to 48000, still can reproduce

48000.mp4

My theory is that there seems to be a time window, when speaker finishes playing its chunk, during which sending more audio in causes it to not play anything. It plays 2 chunks (old and new one) after you call play again