Re: Quality resampling code for libasound

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

 



At Tue, 20 Feb 2007 16:53:22 +1100,
Jean-Marc Valin wrote:
> 
> > Well, did you take a look at alsa-plugins/rate/rate_samplerate.c?
> > That's _much_ easier than rewrting alsa-lib pcm_rate.c.  This is
> > another reason I recommended the external plugin as a first attempt.
> > (And we can change the default thing later on, for example, after
> >  checking whether it gets no performance drawback.)
> 
> Here's the plugin code. It's self-contained (includes my Public Parrot
> Hack code) and it's based on on the libsamplerate plugin. I've tested it
> and it seems to work right, but I'm not sure the code handles
> "fractional samples" perfectly.

Great.

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.


> By that I mean that I don't see how the
> plugin is supposed to handle the fact that the number of output samples
> may vary even with the same number of input samples (e.g. downsampling
> 1024 samples by a factor of 3 may produce either 341 or 342 samples).

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.


At Tue, 20 Feb 2007 17:48:06 +1100,
Jean-Marc Valin wrote:
> 
> Just a detail about my previous patch. I didn't change the GPL license
> header from the original code, but I'm happy to actually release it
> under the LGPL (or even the BSD), since my resampler code is BSD anyway.

Yes, please change to any less-strict license as you with.
The original libsamplerate plugin is released under GPL just because
libsamplerate itself is GPL.  I'm willing to change to LGPL if
allowed.

So, could you fix these issues and repost the patch, together with a
certain description as a changelog to apply to the HG tree?

BTW, we have another rate plugin using libavcodec (in another thread),
and it's interesting to compare the performance of these.


Thanks,

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