[Ffmpeg-devel] alsa input / output
Vladimir Mosgalin
mosgalin
Tue Mar 20 23:15:51 CET 2007
Hi Rich Felker!
On 2007.03.20 at 16:18:19 -0500, Rich Felker wrote next:
Well.. sorry for OT but I really think that your point on this is VERY
wrong.
> 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...
That's exactly the problem you get with device interface; it is just
supposed to "work". But with alsa accessed through library interface,
you can do anything you desire, when your applications doesn't support
this. And you mean application should _always_ use built-in
resamplers? THAT is the right way to get painful-to-listen-to sound,
because most of resamplers will suck. With alsa, however, you just
choose whatever you want, depending on your CPU and personal choice
(believe it or not, but SRC_SINC_FASTEST sounds better than
SRC_SINC_BEST_QUALITY and all other SRC_SINC libsamplerate filters to
me).
Want to make pseudo-surround 5.1 out of stereo music? easily! Just want
to route the same sound from front to back speakers? No problem, a few
lines in .asoundrc (actually, already pre-defined on most
distributions). Don't like resampler in your application? Pick up the
one you like (btw, you should really try this feature if you need
resampler - even " converter "samplerate" " setting, which uses
libsamplerate with SRC_SINC_FASTEST settings produces more quality
output than tweaked lavcresample in mplayer (and much more quality than
lavcresample without any parameters) while utilizing less cpu). What
all your old-style apps use the only true way of quality linux audio
(i.e. jack)? With alsa, you can do it (well.. can't say that it works
perfectly, but when you use one or two good apps that don't block, at
least it works). You can even recode your multi-channel output to AC3 on
the fly to send it via spdif to your receiver.
FYI, high-quality resampler and jack re-route plugin are things that I
am using in my home setup; absolutely must-have features, and alsa which
is used via library interface is the only way of achieving them. You
can't get all that if you use oss compatibility in alsa or raw alsa
devices.
Another thing, while I'm on it: my current soundcard supports only one
stream of 24-bit audio padded into S32_BE packets. Period. Most
applications never ever heard about such format, even latest jack (you
have to use patched/svn one for that) only knows about 24-bit padded
into S32_LE. And even more fancy soundcards exist. You _can't_ support
all this, together with configuration, in end user applications.
--
Vladimir
More information about the ffmpeg-devel
mailing list