From: Peter Howell <p.howell74@rcn.com>
To: pa3gcu@zeelandnet.nl
Cc: linux-newbie@vger.kernel.org
Subject: Re: scripting the "rec" function for a fixed time.
Date: 25 Feb 2003 19:44:08 -0500 [thread overview]
Message-ID: <1046220248.15520.27.camel@smeagle> (raw)
In-Reply-To: <03022506145301.00602@unix.pa3gcu>
On Tue, 2003-02-25 at 01:14, pa3gcu wrote:
> > "rec" is not a stock linux command, and I cannot readily identify a package
> > that includes that application (just trying to match on "rec" turns up
> > several hundred hits in the Debian package database). So I'd suggest you
> > tell us a bit more about your setup, including enough information that we
> > can identify and take a look at the package that includes this command.
>
> rec is an unix command altho' not well supported, slackware 8 has it included.
>
> rec --help shows a lot but thses are relavant to the question;
> -c, --channels=CHANNELS specifies the number of sound channels in FILE
> -d, --device=DEVICE use DEVICE for input/output
> -f, --format=FORMAT specifies bit format of sample
> FORMAT is either s, u, U, A, a, or g
> -r, --rate=RATE sample rate in hertz of FILE
> -s, --size=SIZE interpret size of sample
>
> I think this one could be an help -s xxxxxxxb
> SIZE is either b, w, l, f, d, or D
Alas no :-(
size isn't the file size. It's really the width of each sample. eg b
for 8 bits, w for 16 bits....
It appears that rec does not buffer the sound, but instead writes it
directly to the file.
It's inelegant, but I suppose I could kill the application after a
specified delay. There are two problems with implementing that for me.
Firstly, I don't think I could do that in perl, which I'm most familiar
with because there doesn't appear to be an easy way to spawn a process
and continue running the scipt. Secondly, I don't know how to run a
process and get it's process id, which I'd need to kill it.
Ok, just did a little rtfm. I guess I could use ps and extract the id.
Now I guess I'd better learn some bash scripting
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2003-02-26 0:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-25 0:01 scripting the "rec" function for a fixed time Peter Howell
2003-02-25 2:55 ` Ray Olszewski
2003-02-25 6:14 ` pa3gcu
2003-02-26 0:44 ` Peter Howell [this message]
2003-02-26 6:01 ` pa3gcu
2003-02-26 8:08 ` Elias Athanasopoulos
2003-02-26 10:19 ` Carl
2003-02-26 17:26 ` Eric
2003-02-25 7:01 ` Elias Athanasopoulos
2003-03-08 0:22 ` whitnl73
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1046220248.15520.27.camel@smeagle \
--to=p.howell74@rcn.com \
--cc=linux-newbie@vger.kernel.org \
--cc=pa3gcu@zeelandnet.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.