< prev index next >

src/java.desktop/share/classes/com/sun/media/sound/DataPusher.java

Print this page

        

@@ -25,11 +25,13 @@
 
 package com.sun.media.sound;
 
 import java.util.Arrays;
 
-import javax.sound.sampled.*;
+import javax.sound.sampled.AudioFormat;
+import javax.sound.sampled.AudioInputStream;
+import javax.sound.sampled.SourceDataLine;
 
 /**
  * Class to write an AudioInputStream to a SourceDataLine.
  * Was previously an inner class in various classes like JavaSoundAudioClip
  * and sun.audio.AudioDevice.

@@ -123,11 +125,10 @@
             if (DEBUG || Printer.err) e.printStackTrace();
         }
         if (DEBUG || Printer.debug) Printer.debug("< DataPusher.start(loop="+loop+")");
     }
 
-
     public synchronized void stop() {
         if (DEBUG || Printer.debug) Printer.debug("> DataPusher.stop()");
         if (threadState == STATE_STOPPING
             || threadState == STATE_STOPPED
             || pushThread == null) {

@@ -159,10 +160,11 @@
     }
 
     /**
      * Write data to the source data line.
      */
+    @Override
     public void run() {
         byte[] buffer = null;
         boolean useStream = (ais != null);
         if (useStream) {
             buffer = new byte[BUFFER_SIZE];

@@ -240,7 +242,6 @@
                 pushThread = null;
                 notifyAll();
         }
         if (DEBUG || Printer.debug)Printer.debug("DataPusher:end of thread");
     }
-
 } // class DataPusher
< prev index next >