Repository navigation
How to avoid microphone stutter? #1147
|
I had made a (facade-style) library on top of miniaudio some months ago, and I plan to update it in the future after I'm done with something else. The last thing I remember I was stuck on was the microphone da
8000
ta sounding stuttery when being recorded and then played back... and looking back at the code now, I still don't see why that is... this is the block of code which starts the microphone recording, this is the block which gives it to the user, and this is the block that plays it back |
Replies: 1 comment 2 replies
|
The stutter isn't a device or latency setting — you're silently dropping frames on every ring-buffer wrap. There's also an unrelated use-after-free in the stream path that will bite you separately. 1.
|
The stutter isn't a device or latency setting — you're silently dropping frames on every ring-buffer wrap. There's also an unrelated use-after-free in the stream path that will bite you separately.
1.
acquire_write/acquire_readonly ever give you a contiguous runThis is the direct cause. From
ma_rb_acquire_write:It clamps to the end of the buffer, never wraps. A single acquire/commit pair …