From: Hugh Secker-W. <hs...@ho...> - 2008-03-27 22:03:05
|
Yes, I have had success. I just finished recording simultaneously from four usb microphones (in a four-port hub) for 24 hours straight using four instances of arecord. I piped the output of each arecord into a statistics-gathering program, so I wasn't actually saving the audio data to flash. I have noticed that if I use arecord to write to flash (either the rootfs or the microSD card) arecord occasionally suffers overruns (actually, the complaints come from the ALSA library). Note that arecord is single-threaded and doesn't do any robust buffering, so this isn't surprising. Use 'arecord -l' to get a listing of the audio capture devices. E.g.: root@gumstix-custom-verdex:/media/card$ arecord -l **** List of CAPTURE Hardware Devices **** card 0: default [C-Media USB Headphone Set ], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: default_1 [MXL 990 USB ], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Snowball [Blue Snowball], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 Then use the -D option to select the particular device (using the name immediately following 'card #:'). E.g. to record five seconds at CD sampling rate, mono, from the Snowball mic: root@gumstix-custom-verdex:/media/card$ arecord -d 5 -f cd -c 1 -D hw:Snowball fivesecs.wav Recording WAVE 'fivesecs.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono root@gumstix-custom-verdex:/media/card$ ls -l fivesecs.wav -rwxr-xr-x 1 root root 441044 Mar 27 17:54 fivesecs.wav To listen, first use 'aplay -l' to get a list of the playback devices. E.g.: root@gumstix-custom-verdex:/media/card$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: default [C-Media USB Headphone Set ], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 And then select the particular device, e.g.: root@gumstix-custom-verdex:/media/card$ aplay -D hw:Headset fivesecs.wav Playing WAVE 'fivesecs.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono Good luck. -Hugh |