Subject: Re: a mmap'able audio device??
To: Ken Hornstein <kenh@cmf.nrl.navy.mil>
From: Sujal Patel <smpatel@wam.umd.edu>
List: tech-kern
Date: 03/04/1996 17:53:47
On Mon, 4 Mar 1996, Ken Hornstein wrote:

> While this sounds kinda interesting, it does present some problems.  For
> example, how do you know where the sound card is reading stuff out of the
> DMA buffer?  You could put a chunk of sound right into the middle of the
> buffer pointer, which would sound really bad.

This is true, and it'll be interesting to see how the Linux folks 
actually implemented this because Linux Quake uses this technique for sound 
effects, and I'm sure NetBSD will support Quake fully soon :-)

I would think that the kernel could give you the current position of the 
buffer pointer, and then you'd place your sound "sufficiently" far in 
front of it.  This would be sorta messy though.

> What we really need is the sort of driver abstraction for the capabilities
> that the GUS provides.  With the GUS you can download samples to it and
> just tell the card "play sample that starts here and ends here, and play it
> over and over", and that sort of thing.  I'm not sure if it would make sense
> to put that sort of logic in the sound driver, but it would be cool if you
> could.

I don't think that this would really be good for the sound driver to have 
in it.  If the driver lets you mmap the audio buffer, you'd have enough 
control to really do anything you want IMO.


Sujal