3 * The <code>JavaSoundAudioDevice</code> implements an audio device by using the
9 public class AudioDevice {
12 * Prepares the AudioDevice for playback of audio samples.
15 * The decoder that will be providing the audio samples.
17 * If the audio device is already open, this method returns silently.
20 public void open(Decoder decoder) throws JavaLayerException {
25 * Retrieves the open state of this audio device.
27 * @return <code>true</code> if this audio device is open and playing audio
28 * samples, or <code>false</code> otherwise.
30 public boolean isOpen() {
35 * Writes a number of samples to this <code>AudioDevice</code>.
38 * The array of signed 16-bit samples to write to the audio device.
40 * The offset of the first sample.
42 * The number of samples to write.
44 * This method may return prior to the samples actually being played
45 * by the audio device.
47 public void write(short[] samples, int offs, int len) throws JavaLayerException {
52 * Closes this audio device. Any currently playing audio is stopped as soon as
53 * possible. Any previously written audio data that has not been heard is
56 * The implementation should ensure that any threads currently blocking on the
57 * device (e.g. during a <code>write</code> or <code>flush</code> operation
58 * should be unblocked by this method.
65 * Blocks until all audio samples previously written to this audio device have
73 * Retrieves the current playback position in milliseconds.
75 public int getPosition() {