Paul Vriens wrote:
Hi,
while going through some leftover TRACE's of the Interlocked cleanup, I found the following refcounting in dsound/buffer.c and dsound.c:
dsound/buffer.c: This->buffer->ref--; dsound/buffer.c: This->buffer->ref--; dsound/dsound.c: dsb->buffer->ref++;
Is there a need to clean (i.e. use Interlocked*) this up?
Cheers,
Paul.
buffer is not a COM object. Using Interlocked* functions will not make it thread safe. This needs to be put under the dsb lock to be correct but the odds of a program duplicating a buffer in one thread while deleting a duplicated buffer in another are slim. I'll look into fixing this when I get a chance.