• 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
..
tests Loading commit data...
Makefile.in Loading commit data...
clock.c Loading commit data...
copier.c Loading commit data...
evr.c Loading commit data...
main.c Loading commit data...
mf.idl Loading commit data...
mf.rc Loading commit data...
mf.rgs Loading commit data...
mf.spec Loading commit data...
mf_private.h Loading commit data...
samplegrabber.c Loading commit data...
sar.c Loading commit data...
session.c Loading commit data...
topology.c Loading commit data...