--- Begin Message ---
I just cut the parts out of a bigger patch and I guess I missed something.
The memory clearing part is the 8 bit hardware buffer bug fix.  The locking
is to fix the SetFormat bug.

The problem is that when the hardware primary buffer format changes
which causes a new buffer to be mmapped, the mixer thread continues
to use the old deleted buffer address.  The timer callback gets the
resource shared which doesn't prevent the primary buffer from changing
it's address even with the new locking I tried to add.  It's overkill to
have the timer callback get the resource exclusive every time because
format changes almost never happen and the extra locking is only needed
when they do.

Jerry Jenkins wrote:

> Robert Reif wrote:
> >
> > Here is the patch that addresses the 8 bit mixer problem.  I just
> > cut it out of an old development tree that had a lot of other mixer
> > changes so I doubt it will apply cleanly but it will give you an idea
> > of the problem.
> >
> > This patch and the tests developed for it uncovered the locking
> > issues which I have not fixed yet.  I hope to submit a real fix for
> > all this someday but I hope this partial fix can be of some use
> > until then.
> >
> Seems there are too few EnterCriticalSections to make things better. Hope
> you can complete it soon.
>
> I guess that adding critical sections can synchronize DSOUND, but the
> sound driver - playing thread - remains unchanged,  it still goes its own
> way:-(.


--- End Message ---

Reply via email to