Support for multiple sample rates during playing and recording in an application like Audacity
0
votes
1
answer
2226
views
This is how I have defined my soundcard's channels in
When I check the
.asoundrc
:
pcm.!default {
type plug
slave {
pcm "hw:1,0"
}
}
ctl.!default {
type hw
card 1
}
pcm_slave.usb_1 {
pcm "hw:1,0"
rate 44100
channels 8
buffer_size 4096
period_size 1024
}
pcm.outch1 {
type dshare
ipc_key 1111
slave usb_1
bindings [ 0 ]
hint.description "USB output/playback channel 1 (from output port 1)"
}
pcm.inch1 {
type dsnoop
ipc_key 1111
slave usb_1
bindings [ 0 ]
hint.description "USB input/capture channel 1 (from input port 1)"
}
While the above **works fine with aplay
and arecord
** functions/commands in the terminal, trying to play a 8k audio sample with Audacity
throws the following error :

Audio device info
option in Help
menu (Help-->Audio device option), I see the following:
Device ID: 2
Device name: USB Audio (hw:1,0)
Host name: ALSA
Recording channels: 8
Playback channels: 8
Low Recording Latency: 0.008707
Low Playback Latency: 0.008707
High Recording Latency: 0.034830
High Playback Latency: 0.034830
Supported Rates:
44100
48000
88200
96000
==============================
Device ID: 10
Device name: outch1
Host name: ALSA
Recording channels: 0
Playback channels: 1
Low Recording Latency: -1.000000
Low Playback Latency: 0.023220
High Recording Latency: -1.000000
High Playback Latency: 0.023220
Supported Rates:
44100
==============================
Device ID: 11
Device name: inch1
Host name: ALSA
Recording channels: 1
Playback channels: 0
Low Recording Latency: 0.023220
Low Playback Latency: -1.000000
High Recording Latency: 0.023220
High Playback Latency: -1.000000
Supported Rates:
==============================
As we can see, 8000
or 16000
is not a Supported Rate
from the audio device info. So, it's quite clear why the error is thrown.
So, how and where can I add/set (modify my .asoundrc
maybe?) these sample rates so that any application (including Audacity
of course) can support playback and recording of audio files at any desired sample rate.
Asked by skrowten_hermit
(791 rep)
Aug 2, 2017, 09:04 AM
Last activity: Aug 3, 2017, 06:56 AM
Last activity: Aug 3, 2017, 06:56 AM