Code example for SourceDataLine

Methods: getFormat

0
		return audioData;
	} 
 
	/** Converts a frame count to a duration in milliseconds. */ 
	private long convertFramesToMilliseconds(int frames) {
		return (frames / (long) dataLine.getFormat().getSampleRate()) * 1000;
	} 
 
	/** Converts a duration in milliseconds to a frame count. */ 
	private int convertMillisecondsToFrames(long milliseconds) {
		return (int) (milliseconds / dataLine.getFormat().getSampleRate());
	} 
 
	@Override 
	public void update(LineEvent le) {
		// PlayN.log().debug("update: " + le); 
	} 
 
	@Override 
	public void loop(int count) {
Experience pair programming with AI  Get Codota for Java