[vlc-devel] [PATCH 4/4] directsound: clear the ring buffer ahead of the write pointer (fix #8860)
typx at dinauz.org
Sat Jul 20 14:15:16 CEST 2013
While I agree that the idea will fix the bug since DS Buffer aren't
really made to be used this way, the whole "DS_BUF_SIZE / 3" is
completely arbitrary and might end up erasing data before it's actually
It should be cleaner with IDirectSoundBuffer_GetCurrentPosition getting
you the read pointer and sys->i_write (see TimeGet).
If you are afraid about the unreliability of
IDirectSoundBuffer_GetCurrentPosition you can still remove a few bytes
(like i_buffer) before memsetting the rest to 0.
Denis Charmet - TypX
Le mauvais esprit est un art de vivre
More information about the vlc-devel