• Eduard Permyakov's avatar
    dsound: Commit next audio chunk between play cursor and write cursor to playing. · 975d0632
    Eduard Permyakov authored
    This region of the audio buffer is forbidden to be written to by the
    DirectSound specification. The documentation states: "The write cursor
    is the point after which it is safe to write data into the buffer. The
    block between the play cursor and the write cursor is already committed
    to be played, and cannot be changed safely." However, some applications
    still do this, which has lead to audio glitches only when using the Wine
    DirectSound implementation. Experiments showed that the native DirctSound
    implementation will still play the old audio the first time around when the
    buffer region gets overwritten. Use an approach of copying the next forbidden
    region into a "committed buffer" to add the same behavior to the Wine
    implementation.
    
    Out of performance considerations, only copy data to the committed buffer
    when we detect that an overwrite is possible (i.e. the current mixing
    region of the buffer gets locked).
    Signed-off-by: 's avatarEduard Permyakov <epermyakov@codeweavers.com>
    Signed-off-by: 's avatarAndrew Eikum <aeikum@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    975d0632
Name
Last commit
Last update
..
tests Loading commit data...
Makefile.in Loading commit data...
buffer.c Loading commit data...
capture.c Loading commit data...
dsound.c Loading commit data...
dsound.spec Loading commit data...
dsound_classes.idl Loading commit data...
dsound_convert.c Loading commit data...
dsound_main.c Loading commit data...
dsound_private.h Loading commit data...
duplex.c Loading commit data...
fir.h Loading commit data...
make_fir Loading commit data...
mixer.c Loading commit data...
primary.c Loading commit data...
propset.c Loading commit data...
sound3d.c Loading commit data...
version.rc Loading commit data...