Class Recorder.Capture

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    Recorder

    protected class Recorder.Capture
    extends java.lang.Object
    implements java.lang.Runnable
    Capture thread
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.sound.sampled.AudioFormat audioFormat  
      protected javax.sound.sampled.AudioInputStream audioInputStream  
      protected byte[] buffer  
      protected javax.sound.sampled.DataLine.Info info  
      protected javax.sound.sampled.TargetDataLine line  
      protected java.io.ByteArrayOutputStream out  
      protected javax.sound.sampled.AudioFileFormat.Type targetType  
      protected java.lang.Thread thread  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Capture()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      The code that runs in the thread and recovers the JavaSound capture buffer.
      protected void setupSound()
      Setup the JavaSound System to play the Audio.
      protected void start()
      Start the playback thread which fills the JavaSound playback buffer.
      protected void stop()
      Stop the playback thread and destroy all resources.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • out

        protected java.io.ByteArrayOutputStream out
      • audioInputStream

        protected javax.sound.sampled.AudioInputStream audioInputStream
      • audioFormat

        protected javax.sound.sampled.AudioFormat audioFormat
      • info

        protected javax.sound.sampled.DataLine.Info info
      • targetType

        protected javax.sound.sampled.AudioFileFormat.Type targetType
      • line

        protected javax.sound.sampled.TargetDataLine line
      • buffer

        protected byte[] buffer
      • thread

        protected java.lang.Thread thread
    • Constructor Detail

      • Capture

        protected Capture()
    • Method Detail

      • start

        protected void start()
        Start the playback thread which fills the JavaSound playback buffer.
      • stop

        protected void stop()
        Stop the playback thread and destroy all resources.
      • setupSound

        protected void setupSound()
        Setup the JavaSound System to play the Audio.
      • run

        public void run()
        The code that runs in the thread and recovers the JavaSound capture buffer. Implemented from Runnable interface.
        Specified by:
        run in interface java.lang.Runnable