4

I'm trying to make ALSA 1.0.23 to use different resampling algorithm. I did some research on the Internet and found that putting the line defaults.pcm.rate_converter "<library>" into either /etc/asound.conf or ~/.asoundrc will tell ALSA to use different resampling algorithm.

However, it doesn't seem to work. Putting the following line into ~/.asoundrc defaults.pcm.rate_converter "speexrate_best" doesn't have any effect on either CPU usage or the list of loaded libraries (doing lsof -n | grep speex while playing something yields nothing). Although, the following snippet forces ALSA to use new resampling algorithm:

pcm.!default {
    type rate
    slave {
        pcm "hw:0,0"
        rate 48000
    }
    converter "speexrate_best"
}

Doing so makes CPU usage to 10-15% and makes two new shared libraries appear in the list of lsof, but software mixing stops working and I can't play multiple audio files.

I'm probably missing something obvious. What can be an issue here?

  • Hi user310, did the trick improve your audio? Do you know a way to test if alsa is already using the best possible rate? – Thomas Ahle Jan 26 '12 at 17:26
1

Looks like mplayer was doing resampling all the way long. Playing some wav files with aplay shows that the new resampling algorithm is being used as intended.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.