JMF Solutions

Setting the Audio Capture and Render Buffer Size

 


Problem
To set the audio capture and render buffer sizes . Smaller buffer sizes will reduce latency but will have a tendency for more severe audio breakup. These are parameters that need to be experimented with on different systems.

Solution
AudioBufferControl is obtained from the DataSource and the Player. The one from the DataSource sets the capture buffer size and the one from the Player sets the render buffer size.
 
 
Requirements
 
Platform: JDK 1.1.6 or later
JMF API: 2.0 or later
Implementation: AJ, WPP, SPP *


* AJ = All Java, WPP = Windows Performance Pack, SPP = Solaris Performance Pack
 
Related Classes
 
 
How to run this sample
 


java AudioBufferControl [-c <capture buf size in millisecs>] [-r <render buf size in millisecs>] <URL>


Example:
java AudioBufferControl -c 62 -r 400 javasound://44100
 
Source Code
 
 
Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
VTS OnDemand RHS Banner



Duke's Choice RHS Banner

JavaOne 2014 Replay banner