AudioSystem.getAudioFileTypes returns duplicates

XMLWordPrintable

    • tiger
    • generic
    • generic



      Name: fb126949 Date: 06/24/2003


      If you install Tritonus' file readers and writers, Java Sound will report the same audio file type several times in the returned array

      E.g. the following method prints:
      Supported target types: au aif wav gsm mp3 au wav aif aifc


      public static void listSupportedTargetTypes() {
        String strMessage = "Supported target types:";
        AudioFileFormat.Type[] aTypes =
            AudioSystem.getAudioFileTypes();
        for (int i = 0; i < aTypes.length; i++) {
          strMessage += " " + aTypes[i].getExtension();
        }
        System.out.println(strMessage);
      }

      This bug should be fixed by using an internal hash list or so when assembling the file type array.

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

            Assignee:
            J. Duke
            Reporter:
            Florian Bomers (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: