[Ffmpeg-devel] alsa input / output

Rich Felker dalias
Tue Mar 20 22:18:19 CET 2007


On Tue, Mar 20, 2007 at 08:38:51PM +0000, M?ns Rullg?rd wrote:
> Rich Felker <dalias at aerifal.cx> writes:
> 
> > On Tue, Mar 20, 2007 at 06:16:10PM +0100, Clemens Ladisch wrote:
> >> Luca Abeni wrote:
> >> > The code currently uses alsalib, because I did not find any 
> >> > documentation about how to directly access raw alsa devices.
> >> 
> >> That interface is undocumented, and you'd lose all userspace plugins.
> >
> > Which just shows how horribly misdesigned ALSA is...
> 
> Uh, what's so horrible about having a library for doing things that
> should not be done in kernel space?  Would you rather have each and
> every app replicate that functionality?

Requiring fancy library layers to access hardware is the windows
philosophy. The unix philosophy is that everything is a file/device,
and you use hardware by opening a device node and performing ioctls on
it. This doesn't mean that functionality would have to be moved to
kernelspace. See plan9 for the correct way to do it...

Of couse, as an aside I strongly question the usefulness of lots of
this "functionality". It seems more like bloat to me. If the hardware
doesn't support a particular samplerate it should simply require the
application to provide a supported samplerate, rather than doing
horribly-painful-to-listen-to nearest-neighbor resampling in the
library level...

Rich




More information about the ffmpeg-devel mailing list