[linux-audio-user] A level meter to test

Guy Clotilde guy.clotilde at wanadoo.fr
Thu Jan 9 14:42:00 EST 2003


On/le Tue, 07 Jan 2003 22:19:23 +0100
Laurent Georget <lgeorget3 at club-internet.fr> wrote / a écrit quelque
chose comme:

>   replacing nrecord with arecord+ameter in my script break the pipe
>   and hang up the sound device. First I can't close the ameter
>   window (with icewm as a wm) and I must do a ctrl+C in the aterm
>   invoking ameter (arecord -D ameter | lame -r -m m something.mp3).
>   I can't launch it a second time, or try a "aplay something.wav",
>   it complains that the snd_pcm_open failed.
 > Even if I restart alsasound, no way... I have to reboot to make
 > the sound work as usual!
> > 
> 
> :(( !
> Could you send me the script you are using ,
> I'll try to reproduce   this problem .

As I didn't remember the exact scrips I deleted, I wrote a new one. And it seemed to work without soundcard-locking. I surely have done something weird, but don't know... Anyway the pipe get broken by something in the script and replaced by a huge .wav file, which is what I wanted to avoid, using a pipe.
Here is the script:

# automaticly save the last record in case of
mv -f ~/Last_record.mp3 ~/Before_last_record.mp3
# launch ecasound on a pipe (tmp.raw)
ecasound -i ~/Progs/Enregistrement/tmp.raw -o ~/Last_record.mp3 &
# then launch a terminal (should be removed, but needed to stop the recording with a ctrl+c).
# arecord write to the pipe (tmp.wav)
rxvt -geometry -0-0 -e arecord -f cd -D ameter ~/Progs/Enregistrement/tmp.wav
# tmp.raw is a pipe pointing to tmp.raw. Should be manually created before everything.

I still can't close the ameter window, and as I don't know a better way to stop arecord, I do a ctrl+c in the terminal where it runs. Then, on the screen, the following line is repeted a lot of time:

	arecord: pcm_meter.c:546: snd_pcm_meter_hw_free: Assertion `err == 0' failed.
	Aborted...

with this line at the end:

	Erreur de segmentation

("segfault" in english I believe). It doesn't clutter the screen this way when I just do a "arecord -f cd something.wav".
On my machine, pcm_meter.c is located here:
	alsa-lib-0.9.0rc6/src/pcm/pcm_meter.c
and the line # 546 shows:
	        assert(err == 0);
Anyway it's working :) 

And for the strange "config window disappearing" commentary... My fault, I confused myself with a vu-meter plugin for xmms I was trying at about the same days. What? I was drunk during my holidays testings? Maybe 8P


> Thanks !

No. Thanks to _you_ 
ou plutôt, merci à vous.

> Laurent
> 

Guy CLO~
-----------------------------------------------
http://perso.wanadoo.fr/guy.clotilde/index.html
-----------------------------------------------



More information about the Linux-audio-user mailing list