Hello all.

Being comparatively clueless, I've considered this particular problem for a 
long time. I finally came to what I believe is a solution, but a clunky one. 
Can any shell wizards make this work any better? Is there some other solution?

In other words, it works, but I'd like to put an example up somewhere as a good 
method to be able to capture sound in progress. It wasn't obvious to me, so I 
hope it might help the next one like me. So, any suggestions as to how this 
method can be improved? 

The procedure:

$ mkfifo audio_cat
$ mkfifo to_null

$ cat to_null> /dev/null& \
(cat audio_cat|AudioCompress -C -s 15 -m | \
tee to_null| aplay -r 22050 -f S16_LE -c 2 -D plug:hw:0)&\ 
mplayer -bandwidth 96 -cache 64 -ao pcm:file=audio_cat -playlist 
"http://asx.abacast.com/kboo.asx?ref=js&embedded=false&timeout=false&uofc=false";

... So, now I hear something coming up I want to capture:

$ cat to_null | sox -r 22050 -c 2 -w -s -t .raw - -r 44100 -c2 -w -s -t .wav 
test.wav

$ <ctl-c>

... etc.

So, it seems to work pretty well. It's a little glitchy when everything is 
loading.

AO: [pcm] 22050Hz 2ch s16le (2 bps)
Building audio filter chain for 22050Hz/2ch/s16le -> 22050Hz/2ch/s16le...
Video: no video
Starting playback...
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 22050 Hz, Stereo
underrun!!! (at least 648.999 ms long)
underrun!!! (at least 496.815 ms long)
underrun!!! (at least 623.697 ms long)
underrun!!! (at least 117.697 ms long)
underrun!!! (at least 523.569 ms long)
A:1392.5 (23:12.4) 85.0% 0%

But, then solid as a rock, I think. 

. . .

So, I'm just looking for any comments or suggestions, I guess.

Have a good New Year, Getoo-ers!

-- 
 |\  /|        |   |          ~ ~  
 | \/ |        |---|          `|` ?
 |    |ichael  |   |iggins    \^ /
 michael.higgins[at]evolone[dot]org
-- 
gentoo-user@gentoo.org mailing list

Reply via email to