| 1 |
Rate Converter Plugin Using Libsamplerate |
| 2 |
========================================= |
| 3 |
|
| 4 |
The plugin in rate subdirectory is an external rate converter using |
| 5 |
libsamplerate by Erik de Castro Lopo. You can use this rate converter |
| 6 |
plugin by defining a rate PCM with "converter" parameter, such as: |
| 7 |
|
| 8 |
pcm.my_rate { |
| 9 |
type rate |
| 10 |
slave.pcm "hw" |
| 11 |
converter "samplerate" |
| 12 |
} |
| 13 |
|
| 14 |
The plug plugin has also a similar field, "rate_converter". |
| 15 |
|
| 16 |
Or, more easily, define a global variable "defaults.pcm.rate_converter", |
| 17 |
which is used as the default converter type by plug and rate plugins: |
| 18 |
|
| 19 |
defaults.pcm.rate_converter "samplerate" |
| 20 |
|
| 21 |
Write the above in your ~/.asoundrc or /etc/asound.conf. |
| 22 |
|
| 23 |
The following converter types are available: |
| 24 |
|
| 25 |
- samplerate_best Use SRC_SINC_BEST_QUALITY |
| 26 |
- samplerate_medium Use SRC_SINC_MEDIUM_QUALITY |
| 27 |
- samplerate Use SRC_SINC_FASTEST |
| 28 |
- samplerate_order Use SRC_ZERO_ORDER_HOLD |
| 29 |
- samplerate_linear Use SRC_LINEAR |
| 30 |
|