Code example for SourceDataLine

Methods: open

0
 
		DataLine.Info info = new DataLine.Info(SourceDataLine.class,
				audioFormat);
 
		res = (SourceDataLine) AudioSystem.getLine(info);
		res.open(audioFormat);
 
		return res;
	} 
 
	public void stopSound() { 
		if (clip != null) {
			clip.stop();
		} 
		isRunning = false;
	} 
 
	public boolean isVolumeSupported() { 
		return true; 
	} 
Experience pair programming with AI  Get Codota for Java