http://bugs.winehq.org/show_bug.cgi?id=22498
Summary: Stuttering sound - winealsa.drv regression? Product: Wine Version: 1.1.43 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: myself@rojer.pp.ru
here's a mail i sent more than a year ago to the person who introduced what seems like a regression to me. i don't remember the details anymore, but the bug - stuttering when playing HoMM3 - is still there (just verified with 1.1.43).
--- the regression manifests itself as rather annoying audio skipping and stuttering. having spent some time tracing and looking at the code, i believe that the problem was introduced by this change to dlls/winealsa.drv/waveout.c made on Oct 4:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=717df5b2972b3cb998ca5a...
specifically, this line
+ wwo->dwPlayedTotal += lpWaveHdr->reserved - wwo->dwPlayedTotal;
advances the dwPlayedTotal watermark when i believe it shouldn't. fundamentally, only DSP can report how much has been played, updating this pointer after reporting that a sample has been played makes no sense. DSP has reported that it has played up to a certain point that covers the sample in question, we are reporting this back and removing the sample. we should *not* be changing the value DSP sent us.
i don't know what was the specific issue you were addressing with the patch in question, but i'd like you to take one more look at it, because removing this one line fixes skipping and stuttering for me. ---