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

delayed audio playback on AudioClip

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u6
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
    • Environment:

      Java 7u6b18, Win 7, Netbeans 7.2beta

      Description

      One of the issues I am having now is delayed audio when I call AudioClip's play() method. Usually this happens on the first call to play() and randomly on subsequent. The problem lessens if I set priority to 1, but still it happens on the first call. I am trying to reproduce on test code. Sometimes the delay is a second or more. In my app the user can click on a button, the nodes on the screen change when the button is clicked. I filter for mouse_clicked and play the audio before the eventHandler catches the event and changes the screen. So I was hoping the audio would get a head start over the screen changes, but still the delay remains.

      Attached is a test netbeans project that reproduces the problem. Run class game.Game. When you click on the Start Game link you will notice a delay in the audio playing. Keep clicking on buttons to possibly reproduce. The classes of interest are screen.ButtonFactory and game.AudioManager.

      I will try to reproduce with Java7u7.

        Attachments

          Activity

            People

            • Assignee:
              ddehaven David Dehaven (Inactive)
              Reporter:
              jmartinezjfx Jose Martinez (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: