Subject: Re: eap recording broken?
To: None <tech-kern@NetBSD.org>
From: Christian Biere <email@example.com>
Date: 10/20/2006 20:18:42
Christian Biere wrote:
> Jukka Marin wrote:
> > On Wed, Oct 11, 2006 at 08:14:59PM +0300, Jukka Marin wrote:
> > > I recorded a 1 kHz size wave which makes the problem clearly visible:
> > > http://www.jmp.fi/~jmarin/samples.gif
> > It looks like the 8 "wrong" samples were not updated in the ring buffer
> > when the data was copied, so delaying the copy sounds right.
> Could it be the "XXX" and "-2" part in eap.c? At least 2 * 2 (Stereo) * 2 (16-bit)
> is 8. Maybe that's alright for playback but not recording?
Ok, that would be 8 bytes not 8 samples. However, that hints towards
eap_round_blocksize(). This is used to round blksize which is then used
as "(blksize >> sampshift) - 1". I could imagine that one of those "-1"
is the culprit causing an off-by-one bug.