From: Shane Blaser <shane.blaser@callfire.com>
To: sox-devel@lists.sourceforge.net
Subject: Re: Adjusting write buffer for recording
Date: Sun, 11 Aug 2013 22:11:44 -0700 [thread overview]
Message-ID: <CACB3T6F6yW-_PiZK1aEc4D3XDs6neavoQmBOPkLzCNx=cR3erg@mail.gmail.com> (raw)
In-Reply-To: <20130811171034.GB26948@www.stare.cz>
[-- Attachment #1.1: Type: text/plain, Size: 2183 bytes --]
Rec writes to a file I watch the file.
I listen to the sound coming in and watch the file size. There is a period
of silence then when volume rises the file is written to. But this
introduces a delay I can not afford
I have adjusted the buffer down to 128 ( below that I get constant
overrun) I see no change in the file writing....
On Aug 11, 2013 10:10 AM, "Jan Stary" <hans@stare.cz> wrote:
> 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
> _______________________________________________
> SoX-devel mailing list
> SoX-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-devel
>
[-- Attachment #1.2: Type: text/html, Size: 2965 bytes --]
[-- Attachment #2: Type: text/plain, Size: 405 bytes --]
------------------------------------------------------------------------------
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
[-- Attachment #3: Type: text/plain, Size: 158 bytes --]
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel
next prev parent reply other threads:[~2013-08-12 5:12 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
2013-08-12 5:11 ` Shane Blaser [this message]
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='CACB3T6F6yW-_PiZK1aEc4D3XDs6neavoQmBOPkLzCNx=cR3erg@mail.gmail.com' \
--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).