-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio glitches when using the MME backend #30
Comments
Just like #29 though, increasing the default buffer size from 20 ms to 40 ms makes the problem go away. Switching to output only, however, does not. Taking a look through the excellent API Monitor reveals that MME is using WASAPI internally (no surprises there). When the buffer size is too small, weird things can be seen in the sequence of WASAPI calls: MME literally stops and restarts the WASAPI audio client between buffers. This of course cannot end well. I suspect this is MME's way of reacting to a buffer underflow. |
Strike my last, this behaviour seems to be caused by FlexASIOTest being too slow for the period I was testing with (Windows console output is really slow). Testing with REW doesn't show these start/stop sequences. There are suspicious periods between two Looking at WASAPI calls made by MME, and correlating that to MME buffer state at the time of the calls, MME's behaviour is surprising. MME provides buffers to WASAPI around 5-7 ms after The issue can actually be seen at the very beginning of the stream, where MME initially provides WASAPI with a 40 ms initial buffer, which is fine, but then after the first 20 ms half is reported as consumed by WASAPI (through When using a larger buffer size, such as 40 ms, the issue seems to disappear and the behaviour appears to be correct. I suspect that's because the WASAPI buffer always has a fixed length of around ~47 ms (2066 samples at 44.1 kHz) in my testing. It might be that MME only behaves correctly when the total size of its buffers (here, 80 ms) is larger than the WASAPI buffer size. Just like #29, the correct fix would be to increase the default buffer size from 20 ms to at least 40 ms. |
I've noticed that, with FlexASIO 1.0, when using MME (default settings otherwise), with some USB audio device, audio from REW is glitchy. This doesn't appear to be the same problem as #29 because the stream callbacks do keep firing when using MME.
The text was updated successfully, but these errors were encountered: