Re: Quality resampling code for libasound

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Tue, 20 Feb 2007 22:54:48 +1100,
Jean-Marc Valin wrote:
> 
> > One concern in your code is that you use the same function names as in
> > speex.  This may result in namespace conflictions if alsa-lib is used
> > together with speex.  Please eitehr make these functions static and
> > include from the main code, or rename functions with another prefix
> > (e.g. snd_) to avoid confliction.
> 
> Right, I hadn't considered that yet. I think I prefer the static
> solution -- unless you're happy with linking directly with libspeex,
> which could be interesting if you're want to use the echo canceller and
> noise suppressor at some point.

OK.

> > That's one part making alsa-lib rate plugin so complicated.
> > Anyways, the resampling algorithm plugin doesn't take care much about
> > it, so far.
> 
> Are you telling me people use the high-quality sinc in libsamplerate
> just to have the plugin drop samples once in a while? Can we just have a
> resampler that actually produces valid output once and for all? I guess
> it's another good reason to go directly with a non-plugin resampler.

No, I mean that there are many black magics in the alsa rate plugin to
calculate the sampling buffer size constant so that the resampler side
doesn't take care of it so much.  And this has nothing to do with the
fact whether it's an external plugin or not.

I understand that you would like to put that to alsa-lib.  But, it
would reduce neither code size and complication.  So let's prove the
quality and performance first as a plugin, then replace the default
one later.

> BTW, the way my resampler works is that you tell it the size of the
> input and output buffer and it tells you how many samples were read and
> how many were written (at least one of which is the same as the buffer
> size you passed). This should be flexible enough to put it in libasound
> without too much complications...

The actual problem isn't that.  It's the restriction of "period" model
that the current ALSA PCM is based on.


Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux