http://bugs.winehq.org/show_bug.cgi?id=28723
--- Comment #22 from Andrew Eikum aeikum@codeweavers.com 2011-11-03 10:18:45 CDT --- (In reply to comment #21)
However, what native is said to do and Wine doesn't is to clamp period and duration. From what I've read (but not yet tested, which is why I've not yet written that patch),
- min. duration should probably be 3*period (at least for Wine)
I tested this and found the minimum duration to be the length of two default periods on Windows 7.
That said, I'm still curious to see the results of this:
Alexey, how does that app react if you internally set duration to 30ms even when it asks for 20ms?
I believe native can get away with a buffer size slightly > 11ms. Presumably, when the periodic 10ms event fires, the mixer has mixed 10ms of data that was immediately fed to the HW and the app has ~9ms to provide the next chunk. Wine needs more latency because mixer and event and HW are not synchronised, e.g. winmm has a periodic feeder thread, mmdevapi adds another one etc.
I agree, this might be our best solution.