Class AudioPlayer.AudioThread

java.lang.Object
java.lang.Thread
fr.formiko.usuel.media.audio.AudioPlayer.AudioThread
All Implemented Interfaces:
Runnable
Enclosing class:
AudioPlayer

class AudioPlayer.AudioThread extends Thread
  • Field Details

    • ap

      private AudioPlayer ap
    • normallyEnded

      private boolean normallyEnded
    • gainControl

      private FloatControl gainControl
  • Constructor Details

  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • doSounds

      private void doSounds()
      open file & do sounds.
    • updateVolume

      private void updateVolume()
    • getOutFormat

      private AudioFormat getOutFormat(AudioFormat inFormat)
      get audio format.
    • stream

      private void stream(AudioInputStream in, SourceDataLine line) throws IOException
      do sounds by reading line by line.
      Throws:
      IOException
    • interrupt

      public void interrupt()
      interrupt game & don't launch next music.
      Overrides:
      interrupt in class Thread