Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4896221
Votes 0
Synopsis RFE: Add Ease-Of-Use methods to AudioSystem
Category java:classes_sound
Reported Against tiger
Release Fixed 1.5(tiger)
State 10-Fix Delivered, request for enhancement
Priority: 3-Medium
Related Bugs 4907274 , 4907275
Submit Date 25-JUL-2003
Description




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.


======================================================================
Work Around
N/A
Evaluation
Working group and CCC agreed that this is useful.
  xxxxx@xxxxx   2003-08-08
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang