js-lameworker icon indicating copy to clipboard operation
js-lameworker copied to clipboard

process hanging sometimes on arrival to lame.encodeFlush function

Open javismiles opened this issue 9 years ago • 0 comments

This is a fantastic library, i'm having just 1 issue with it. in both chrome and firefox, sometimes the process hangs. After testing, i detected where it happens, it's just at the end of recording when this call is made

// Get the remaining data out of LAME before closing the session. lame.encodeFlush(LAME_HANDLE, function (error, buffer) { // Merge all buffers into a Blob.

Things will get stuck in there, and only work well again after refreshing the page, in my app i have to record 10 sounds in a row, with pauses in between and activation of recording process is done every time via button (therefore long pauses in between). usually this happens after the first one, but if it passes the second one then it continues no probs until the 10th one typically.

No error messages are generated, even a Try-catch shows nothing. The execution simply never enters that lame.encodeFlush function, but it does always arrive right before it (verified with traces).

I have tried the exact code from your example.html code on my server and the same issue happens

what can be the reason for this blockage before that lame.encodeFlush function and can i try anything to fix it?

Thank you for developing this great library :)

javismiles avatar Oct 06 '15 23:10 javismiles