Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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, but I'm complete noob. What can be an issue here?

share|improve this question
    
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
add comment

1 Answer

up vote 0 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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