[CM] snd-gtk-alsa "alsa_audio_open: could not set rate to exactly 44100, set to 3200 instead"
Sebastian Tennant
sebyte@smolny.plus.com
Wed, 01 Feb 2006 23:41:45 +0000
"Bill Schottstaedt" <bil@ccrma.Stanford.EDU> wrote:
> 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.
I'm afraid a lot of what you are saying is over my head, and I can't
say I understand the ~/.asoundrc 'language' either.
With my existing ~/.asoundrc, (which works with all my other audio
apps), when I run snd with the command:
$ SNDLIB_ALSA_DEVICE=plughw:1 snd file.wav
it produces the following errors:
[22:37:00] alsa_audio_open: plughw:1: could not set rate to exactly 44100, set to 0 instead
[22:37:00] alsa_dump_configuration: status of plughw:1
hw_params status of plughw:1
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: (44101 44102)
PERIOD_TIME: [1000 23219)
PERIOD_SIZE: 1024
PERIOD_BYTES: 4096
PERIODS: 3
BUFFER_TIME: [3000 69659)
BUFFER_SIZE: 3072
BUFFER_BYTES: 12288
TICK_TIME: 1000
sw_params status of plughw:1
start_mode: DATA
xrun_mode: STOP
tstamp_mode: NONE
period_step: 0
sleep_min: 0
avail_min: 0
xfer_align: 0
silence_threshold: 0
silence_size: 0
boundary: 0
[22:37:00] alsa_audio_open: cannot set hardware parameters for plughw:1
[22:37:00] can't play : alsa_audio_open: cannot set hardware parameters for plughw:1
[22:37:00] can't play : alsa_audio_open: cannot set hardware parameters for plughw:1
N.B. I changed '0' to '1' on the command line because the external
audio I/O device that I want snd to use is card 1
Do I need to modify my ~/.asoundrc, if so how?
sdt
P.S. Here's my ~/.asoundrc again (for your convenience).
#set Edirol UA-3FX as default hardware device for all alsa aware applications
pcm.!default { type hw card 1 device 0 }
ctl.!default { type hw card 1 device 0 }
#force OSS apps to use Edirol UA-3FX too (with 'aoss' command)
pcm.dsp0 { type plug slave.pcm hw:1,0 }