Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4896221

RFE: Add Ease-Of-Use methods to AudioSystem

    Details

    • Subcomponent:
    • Resolved In Build:
      tiger
    • CPU:
      generic
    • OS:
      generic

      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.


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

        Attachments

          Activity

            People

            • Assignee:
              fbomerssunw Florian Bomers (Inactive)
              Reporter:
              fbomerssunw Florian Bomers (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: