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

RFE: DataLine.getFramePosition() should return long

    Details

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

      Description

      Name: fb126949 Date: 05/18/2004

      The method DataLine.getFramePosition() returns an int value. This value, however, has a very limited range and will overflow (wrap-around) after 2 billion frames -- about 13:20 hours at CD quality, and even shorter for higher sample rates. During the following 13 hours, getFramePosition will report increasing negative numbers, until 0 is reached again.

      One objective of Java Sound in Tiger is to stabilize the implementation and make it usable for long-term usage found in security software, telco usage, VoIP, and streaming audio like Internet Radio. This API flaw is a possible stopper for adoption of Java Sound for such applications.

      The suggested fix is to add a method to interface DataLine:
          long getLongFramePosition()

      This API caused failure of the new reliability tests (see bug #5047795). The implementation was changed to operate on longs internally, so that a fix for this bug just means to expose the already internally existing method.

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

        Attachments

          Issue Links

            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: