From: Jan Stary <hans@stare.cz>
To: sox-devel@lists.sourceforge.net
Subject: Re: Adjusting write buffer for recording
Date: Sun, 11 Aug 2013 19:10:35 +0200 [thread overview]
Message-ID: <20130811171034.GB26948@www.stare.cz> (raw)
In-Reply-To: <CACB3T6HYUWP+dAAQUdXNVR3uP78nZ=c5YQe-9XokZThL8-CSYw@mail.gmail.com>
On Aug 09 14:05:32, shane.blaser@callfire.com wrote:
> Hello I have an application that processes audio as rec writes the file.
Does this mean that rec(1) writes into a pipe
and your application is reading that pipe?
> rec is buffering the data before it writes and I get
> the updates about 2 or 3 seconds late.
How do you know that? How exactly are you reading
what rec(1) is writing?
> I have played with the --buffer pram and I not been able to see a
> difference.
>
> I would like to tell rec to write the data as soon as it gets it or reduce
> the file write buffer size.
That's what --buffer is supposed to do ...
> I have silence detection on
> rec -c 1 -r 8000 --buffer 4096 currentRecording.wav silence 1 0.0001 2.1% 1
> 15.0 2.6%
>
> The writes look like this
>
> Size of currentRecording.wav = 24576 Size of currentRecording.wav = 36864
> *Size* *of* *currentRecording.wav* *=* *45056* *Size* *of* *
> currentRecording.wav* *=* *77824*
The steps are indeed multiples of 4096.
Can you try with other --buffer to see
if the data becomes available to your application
in the chunks that rec(1) is writing?
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
next prev parent reply other threads:[~2013-08-11 17:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 21:05 Adjusting write buffer for recording Shane Blaser
2013-08-11 17:10 ` Jan Stary [this message]
2013-08-12 5:11 ` Shane Blaser
2013-08-12 6:09 ` Jan Stary
2013-08-12 14:31 ` Shane Blaser
2013-08-12 16:03 ` Jan Stary
2013-08-12 16:16 ` Shane Blaser
2013-08-12 17:11 ` Jan Stary
2013-08-12 17:28 ` Shane Blaser
2013-08-12 17:48 ` Jan Stary
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-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130811171034.GB26948@www.stare.cz \
--to=sox-devel@lists.sourceforge.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).