Re: Quality resampling code for libasound

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

 



> Yes.  I'll apply your current version to the HG tree now, then.

Thanks. Now, what are the requirements to have it enabled as the default
resampler?

>> What kind of document do you want? I can't find anything about the other
>> sample rate converters, so I'm not sure what it should look like.
> 
> A brief instruction how to set up would be enough.
> See alsa-plugins/doc/samplerate.txt, for example.
>
> Although it's planned to be merged in future, a documentation is
> always nice to have :)
>

OK, did a bit of search/replace on samplerate.txt and attached the
result. As you can see, it's fairly similar. So far, I'm also including
3 levels of quality that match the libsamplerate levels, but I can
change that depending on what people want. The Speex resampler offers
quality settings that range from 0 to 10, so I can expose them all (is
there a way to pass a quality parameter to the resampler instead of
having to create lots of symbolic links?).

	Jean-Marc
Rate Converter Plugin Using Libsamplerate
=========================================

The plugin in rate subdirectory is an external rate converter using
the Speex resampler (aka Public Parrot Hack) by Jean-Marc Valin.  You can 
use this rate converter plugin by defining a rate PCM with "converter" 
parameter, such as:

	pcm.my_rate {
		type rate
		slave.pcm "hw"
		converter "speexrate"
	}

The plug plugin has also a similar field, "rate_converter".

Or, more easily, define a global variable "defaults.pcm.rate_converter",
which is used as the default converter type by plug and rate plugins:

	defaults.pcm.rate_converter "speexrate"

Write the above in your ~/.asoundrc or /etc/asound.conf.

The following converter types are available:

  - speexrate_best	Use quality 10 (equivalent to SRC_SINC_BEST_QUALITY)
  - speexrate_medium	Use quality 5 (equivalent to SRC_SINC_MEDIUM_QUALITY)
  - speexrate		Use quality 3 (equivalent to SRC_SINC_FASTEST)

-------------------------------------------------------------------------
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