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

AudioInputStream.read() is broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 5.0
    • client-libs
    • b53
    • x86
    • windows_98, windows_2000

      FULL PRODUCT VERSION :
      java version "1.5.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
      Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows98

      A DESCRIPTION OF THE PROBLEM :
      AudioInputStream.java

      method read() is broken: returns 1 always.

      line 192 is:
      return temp & 0xFF;
      should be:
      return data[0] & 0xFF;

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Sample code in
      docs/guide/sound/programmer_guide/chapter7.html#114527
      doesn't work

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      AudioInputStream.read() should return the next byte in an 8-bit unsigned audio file.
      ACTUAL -
      AudioInputStream.read() returns 1 always

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      rewrite code to use read(onebByteArray)
      ###@###.### 11/1/04 17:36 GMT

            amenkov Alex Menkov
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: