< prev index next >

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

Print this page

        

*** 25,35 **** package com.sun.media.sound; import java.util.Arrays; ! import javax.sound.sampled.*; /** * Class to write an AudioInputStream to a SourceDataLine. * Was previously an inner class in various classes like JavaSoundAudioClip * and sun.audio.AudioDevice. --- 25,37 ---- package com.sun.media.sound; import java.util.Arrays; ! 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,133 **** 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) { --- 125,134 ----
*** 159,168 **** --- 160,170 ---- } /** * 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,246 **** pushThread = null; notifyAll(); } if (DEBUG || Printer.debug)Printer.debug("DataPusher:end of thread"); } - } // class DataPusher --- 242,247 ----
< prev index next >