[CM] snd-gtk-alsa "alsa_audio_open: could not set rate to exactly 44100, set to 3200 instead"

Bill Schottstaedt bil@ccrma.Stanford.EDU
Wed, 1 Feb 2006 04:09:04 -0800

Fernando explained what is going on, I think (at least his bugfix works
on my machine).  aplay uses the device "plughw:0", whereas snd/sndplay
default to "hw:0".  plughw then provides low-fi sampling rate interpolation
if necessary, whereas hw just throws up its hands.  To see aplay in the
same mode

aplay --device=hw:0 oboe.snd

and to get snd to use alsa's interpolator:

SNDLIB_ALSA_DEVICE=plughw:0 snd oboe.snd

(I think -- this looks like bash, and won't work in tcsh -- I did this:)

setenv SNDLIB_ALSA_DEVICE "plughw:0"
snd oboe.snd

I think I'll add scheme/ruby variables for alsa-device, alsa-playback-device, and
alsa-capture-device so that this can be set in ~/.snd or wherever, and add
Fernando's two notes to grfsnd.html in a new section ("Snd and Alsa"), and
it seems to me that Snd should provide hi-fi interpolation in the fallback
case -- I didn't realize this was such a complex business.  Any other suggestions
are always welcome.

Another minor annoyance -- with plughw:0, snd now complains:

":;alsa_audio_open: plughw:0: could not set rate to exactly 22050, set to 22100 instead"

which I'll either replace with my own src, or add a way to turn the warning off.