-
Enhancement
-
Resolution: Fixed
-
P3
-
5.0
-
tiger
-
generic
-
generic
Name: fb126949 Date: 07/24/2003
In order to get a clip, source data line or target data line, one has to write code which is not very intuitive. Example for getting a Clip instance:
DataLine.Info info = new DataLine.Info(
Clip.class, // the class type of requested DataLine
format); // requested format of the DataLine
Clip clip = (Clip) AudioSystem.getLine(info);
Easier would be to have specialized high-level methods to get Java Sound's most important objects:
AudioSystem.getClip(AudioFormat)
AudioSystem.getClip(AudioFormat, Mixer.Info)
AudioSystem.getSourceDataLine(AudioFormat)
AudioSystem.getSourceDataLine(AudioFormat, Mixer.Info)
AudioSystem.getTargetDataLine(AudioFormat)
AudioSystem.getTargetDataLine(AudioFormat, Mixer.Info)
So the example above would be reduced to
Clip clip = AudioSystem.getClip(format);
This will ease development in Java Sound and reduce its real and perceived complexity.
======================================================================