delayed audio playback on AudioClip

XMLWordPrintable

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

      Java 7u6b18, Win 7, Netbeans 7.2beta

      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.

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

              Created:
              Updated:
              Resolved:
              Imported: