Sweden-Number/dlls/dsound
Eduard Permyakov 975d0632a1 dsound: Commit next audio chunk between play cursor and write cursor to playing.
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: Eduard Permyakov <epermyakov@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:48:41 +02:00
..
tests
Makefile.in
buffer.c dsound: Commit next audio chunk between play cursor and write cursor to playing. 2021-09-20 22:48:41 +02:00
capture.c
dsound.c
dsound.spec
dsound_classes.idl
dsound_convert.c dsound: Commit next audio chunk between play cursor and write cursor to playing. 2021-09-20 22:48:41 +02:00
dsound_main.c
dsound_private.h dsound: Commit next audio chunk between play cursor and write cursor to playing. 2021-09-20 22:48:41 +02:00
duplex.c
fir.h
make_fir
mixer.c dsound: Commit next audio chunk between play cursor and write cursor to playing. 2021-09-20 22:48:41 +02:00
primary.c
propset.c
sound3d.c
version.rc