Subject: Re: audio(9) question
To: J. <nathanw@MIT.EDU>
From: D. <>
List: tech-kern
Date: 06/25/2001 20:48:45
On 25 Jun 2001 13:46:09 -0400, Nathan J. Williams wrote:
> "Jared D. McNeill" <> writes:
> > The trigger_output function is supposed to supply a "circular buffer" that
> > contains data to be transfered to the sound card.
> > 
> > My question is, once I get to the end of this buffer, how do I load more
> > data to it? Simply reading from the beginning again makes the sound loop.
> The higher-level audio code calls trigger_output with a callback
> routine (audio_pint()) that will be called after each "blksize" chunk
> is transferred to the device. The audio_pint() routine takes care of
> keeping the circular buffer filled.

How does it know when the data has been transfered to the device? 

> Note that normally the size of the buffer (end - start) is larger than
> blksize, so that audio_pint() will get several chances to do refilling
> before the device gets to the end of the buffer and wraps around.

Hrm, I keep getting the same data over and over again. Mind having a
look at the code and telling me if you see anything overly wrong?