Class AudioPlayer.Execute

  • Enclosing class:
    AudioPlayer

    public class AudioPlayer.Execute
    extends java.lang.Object
    Passes information from the control thread to the playing thread
    • Constructor Detail

    • Method Detail

      • play

        protected void play​(java.net.URL url,
                            double offset,
                            double speed)
                     throws java.lang.InterruptedException,
                            java.io.IOException
        Throws:
        java.lang.InterruptedException
        java.io.IOException
      • pause

        protected void pause()
                      throws java.lang.InterruptedException,
                             java.io.IOException
        Throws:
        java.lang.InterruptedException
        java.io.IOException
      • send

        private void send()
                   throws java.lang.InterruptedException,
                          java.io.IOException
        Throws:
        java.lang.InterruptedException
        java.io.IOException
      • possiblyInterrupt

        protected void possiblyInterrupt()
                                  throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • failed

        protected void failed​(java.lang.Exception e)
      • offset

        public double offset()
        Returns the offset.
        Returns:
        the offset, in seconds
      • speed

        public double speed()
        Returns the speed.
        Returns:
        the speed (ratio)
      • url

        public java.net.URL url()
        Returns the URL.
        Returns:
        The resource to play, which must be a WAV file or stream