On Tue, 18 Feb 2003, Jaroslaw Sobierski wrote:
> Quoting Jaroslav Kysela:
> [...]
> > >
> > > v = *src;
> > > if (cmpxchg(hw, 0, 1) == 0)
> > > v -= *sw;
> > > xadd(sw, v);
> > > do {
> > > v = *sw;
> > > if (v > 0x7fff)
> > > s = 0x7fff;
> > > else if (v < -0x8000)
> > > s = -0x8000;
> > > else
> > > s = v;
> >
> > A bit correction (we have to avoid zero results in hw buffer):
> >
> > else if (v == 0)
> > s = 1;
> > else
> > s = v;
> >
>
> Why?! It's like I've written yesterday : even if the outcoming sample
> is zero, we can still treat the hw buffer as cleared. It makes no
> difference whether it was reset by the driver or the samples just
> added up to zero. If we have zero in the hw not because of a reset
> we must also have 0 in sw, so the clearing code will have no effect.
Thanks for correction.. Some things are not visible at first glance.
Jaroslav
-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel