Re: Sox recording to null of an audio loopback?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



JamesH <hauge.james@xxxxxxxxx> wrote:
> Aloha from Hawaii!
> 
> I'm using a Raspberry Pi and am trying to make an alarm kinda thing...

Alarms play noises, not record, right?

> What I need to figure out how to do, and what I'm looking for help with is
> to figure out how to make sox (using the rec command I believe) record into
> a null file (meaning it doesn't really record, just goes through the
> motions) until there's 5 seconds of silence...
> 
> Being that the Raspberry Pi doesn't have any kind of audio capture setup, I
> was able to run a command that brought up a loopback audio device (that
> command is "sudo modprobe snd-aloop") 

I'm not sure I follow.  You want to record 5 seconds of
generated silence into nothing?

> Now, how can I give sox a command to record from the loopback until there's
> 5 seconds of audio, or should I be looking at a different way of checking if
> the audio output of the raspberry pi has no sound?

I'm not familiar with recording with sox and have never
compiled snd-aloop into my kernels, but probably:

	AUDIODEV=... rec -n trim 0 5

You'll need to figure out the value of AUDIODEV for the aloop,
though.   If your kernel has support compiled, looking at the
contents of /proc/asound might help; as would using alsamixer.
(There's more/better supported ways, but I forget them).

Based on what I'm reading, running: sleep 5
would accomplish the same thing, right?

------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux