JDK-4896221 : RFE: Add Ease-Of-Use methods to AudioSystem
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-07-25
  • Updated: 2017-05-16
  • Resolved: 2003-09-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Description

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.


======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b22
2004-06-14

PUBLIC COMMENTS RFE: Add Ease-Of-Use methods to AudioSystem
2004-06-10

EVALUATION Working group and CCC agreed that this is useful. ###@###.### 2003-08-08
2003-08-08