adjusting write buffer for rec?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

adjusting write buffer for rec?

Shane Blaser
Hello I have an application that processes audio as rec writes the file.

rec is buffering the data before it writes and I get the updates about 2 or 3 seconds late.

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.

Any ideas ?

I just pulled down the source any ideas what file handles writing the files?


Thanks

Shane

------------------------------------------------------------------------------
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-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: adjusting write buffer for rec?

keghn
 hello,
 Might have to use a faster language. 
 I use c and c++ with openAL and freealut to capture sound and save it as a wave file, or play
it directly to the head phones or speakers.
 Unless there is compiler/linker that can convert a bash scrip to a machine language program?







-----Original Message-----
From: Shane Blaser <[hidden email]>
To: sox-users <[hidden email]>
Sent: Fri, Aug 9, 2013 1:25 pm
Subject: [SoX-users] adjusting write buffer for rec?

Hello I have an application that processes audio as rec writes the file.

rec is buffering the data before it writes and I get the updates about 2 or 3 seconds late.

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.

Any ideas ?

I just pulled down the source any ideas what file handles writing the files?


Thanks

Shane
------------------------------------------------------------------------------
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-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
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-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: adjusting write buffer for rec?

Shane Blaser
Not sure I understand I have wrapped sox (rec), sox is written in C.

My app is watching the output from rec and rec is just buffering a bit too much....


On Fri, Aug 9, 2013 at 2:55 PM, <[hidden email]> wrote:
 hello,
 Might have to use a faster language. 
 I use c and c++ with openAL and freealut to capture sound and save it as a wave file, or play
it directly to the head phones or speakers.
 Unless there is compiler/linker that can convert a bash scrip to a machine language program?







-----Original Message-----
From: Shane Blaser <[hidden email]>
To: sox-users <[hidden email]>
Sent: Fri, Aug 9, 2013 1:25 pm
Subject: [SoX-users] adjusting write buffer for rec?

Hello I have an application that processes audio as rec writes the file.

rec is buffering the data before it writes and I get the updates about 2 or 3 seconds late.

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.

Any ideas ?

I just pulled down the source any ideas what file handles writing the files?


Thanks

Shane
------------------------------------------------------------------------------
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-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
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-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
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-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: adjusting write buffer for rec?

Ulrich Klauer-2
In reply to this post by Shane Blaser
Shane Blaser wrote:

> I have an application that processes audio as rec writes the file.
> rec is buffering the data before it writes and I get the updates  
> about 2 or 3 seconds late.
> I have played with the --buffer pram and I not been able to see a difference.

Are the programs connected via pipes? The pipe does its own buffering,  
the buffer size is system dependent (see  
http://www.pixelbeat.org/programming/stdio_buffering/). Depending on  
the file format and sample rate, a few seconds is conceivable for a  
64K buffer.

Ulrich


------------------------------------------------------------------------------
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-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: adjusting write buffer for rec?

Eric Wong
Ulrich Klauer <[hidden email]> wrote:
> Are the programs connected via pipes? The pipe does its own buffering,  
> the buffer size is system dependent (see  
> http://www.pixelbeat.org/programming/stdio_buffering/).

Btw, I've been meaning to look into using _IONBF instead of _IOFBF if we
detect stdin/stdout are pipes.  And maybe just an option to just use
_IONBF unconditionally.

------------------------------------------------------------------------------
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-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users