comirva.audio.util
Class MPlayerAudioInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by javax.sound.sampled.AudioInputStream
          extended by comirva.audio.util.MPlayerAudioInputStream
All Implemented Interfaces:
Closeable

public class MPlayerAudioInputStream
extends AudioInputStream


Nested Class Summary
(package private)  class MPlayerAudioInputStream.InterruptTimerTask
          Just a simple TimerTask that interrupts the specified thread when run.
(package private)  class MPlayerAudioInputStream.StreamGobbler
           
 
Field Summary
protected static boolean DEBUG
           
protected  BufferedInputStream in
           
protected  float sampleRate
           
protected  File tempFile
           
protected static File tempFolder
           
 
Fields inherited from class javax.sound.sampled.AudioInputStream
format, frameLength, framePos, frameSize
 
Constructor Summary
MPlayerAudioInputStream(File inputFile, float sampleRate)
           
 
Method Summary
 int available()
           
 void close()
           
protected  void finalize()
           
 AudioFormat getFormat()
           
 long getFrameLength()
           
 void mark(int readlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 long skip(long n)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

protected BufferedInputStream in

sampleRate

protected float sampleRate

tempFile

protected File tempFile

DEBUG

protected static final boolean DEBUG
See Also:
Constant Field Values

tempFolder

protected static final File tempFolder
Constructor Detail

MPlayerAudioInputStream

public MPlayerAudioInputStream(File inputFile,
                               float sampleRate)
Method Detail

available

public int available()
              throws IOException
Overrides:
available in class AudioInputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class AudioInputStream
Throws:
IOException

getFormat

public AudioFormat getFormat()
Overrides:
getFormat in class AudioInputStream

getFrameLength

public long getFrameLength()
Overrides:
getFrameLength in class AudioInputStream

mark

public void mark(int readlimit)
Overrides:
mark in class AudioInputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class AudioInputStream

read

public int read()
         throws IOException
Overrides:
read in class AudioInputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class AudioInputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class AudioInputStream
Throws:
IOException

reset

public void reset()
           throws IOException
Overrides:
reset in class AudioInputStream
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class AudioInputStream
Throws:
IOException

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable