• Giovanni Mascellani's avatar
    mf/sar: Allow requesting more than a sample per period. · adffa116
    Giovanni Mascellani authored
    The IAudioClient implementation from both Windows and winepulse.drv
    never sets the event more than once per period, which is usually
    around 10 ms long. Some codecs produce audio samples shorter than
    10 ms, so it is critical that the SAR is able to process more than
    a sample per period.
    
    This is not currently the case: a new sample is requested only in
    audio_renderer_render, which is executed (at most) once per period.
    This results in the SAR not being able to keep up with the audio
    client, and eventually underrunning.
    
    With this patch the SAR keeps a count of how many frames are
    currently queued, and a new sample is immediately requested if
    the internal queue has less than a buffer worth of frames.
    
    This patch fixes audio stuttering problems in the logo videos
    of Borderlands 3, Deep Rock Galactic and Mutant Year Zero.
    Signed-off-by: 's avatarGiovanni Mascellani <gmascellani@codeweavers.com>
    Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    adffa116
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
Makefile.in Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...