Code example for SourceDataLine

Methods: drainclose

0
			return false; 
		} 
	} 
 
	public static void audio_close() { 
		line.drain();
		line.close();
	} 
 
	public static void audio_initAudioFormat(BigInteger SampleRate,
			BigInteger SampleSizeInBits, BigInteger Channels) {
		if (SampleSizeInBits.intValue() == 8) {
			audioFormat = new AudioFormat(SampleRate.floatValue(),
					SampleSizeInBits.intValue(), Channels.intValue(), false,
					false); 
		} else { 
			audioFormat = new AudioFormat(SampleRate.floatValue(),
					SampleSizeInBits.intValue(), Channels.intValue(), true,
					false); 
		} 
Experience pair programming with AI  Get Codota for Java