[Bug 27937] winmm kept busy playing silence after play finishes

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Sep 19 09:41:32 CDT 2011


http://bugs.winehq.org/show_bug.cgi?id=27937

--- Comment #5 from Jörg Höhle <hoehle at users.sourceforge.net> 2011-09-19 09:41:31 CDT ---
That bug is caused by waveform.c:WOD_PushData filling up the whole buffer with
silence when the queue is empty. IMHO winmm has no business feeding that much
silence. Something at most period_size should be the upper limit, if at all.

Feeding silence is strictly superfluous (once mmdevapi works correctly). I'm
not convinced it helps in avoiding cracks at the end of a sound (IIRC MS
recommends doing that) any better than simply entering an underrun. Why should
it, what would be different?

I believe cracks are avoided by reducing volume or alternatively decreasing the
sample value towards 0. Immediately writing 0 is asking for a crackling noise
when the last sample value was e.g. 0.96.

Feeding silence is quite bad because it adds delays. What if the app submits
data 0.5ms after winmm decided to write some silence? Suddenly pauses will be
heard where there should be none.

See bug #28027 for another issue caused by writing silence.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the wine-bugs mailing list