de.humatic.dsj
Class DSFiltergraph.DSAudioStream

java.lang.Object
  extended by java.io.InputStream
      extended by de.humatic.dsj.DSFiltergraph.DSAudioStream
All Implemented Interfaces:
java.io.Closeable
Enclosing class:
DSFiltergraph

public class DSFiltergraph.DSAudioStream
extends java.io.InputStream

Nested class that wraps the stream of audio bytes dsj delivers when the DELIVER_AUDIO bit is set on construction. Easily made into a javax.sound.sampled.AudioInputStream by calling new AudioInputStream(DSAudioStream, DSAudioStream.getFormat()).


Method Summary
 int available()
           
 int getBufferSize()
          Return the size of the buffer needed to hold this streams bytes.
 javax.sound.sampled.AudioFormat getFormat()
          The returned AudioFormat holds the information about samplerate, samplesize etc, that DSAudioStream does not directly supply and can be used to construct an AudioInputStream.
 int read()
           
 int read(byte[] audioBytes)
           
 int read(byte[] audioBytes, int offset, int length)
           
 
Methods inherited from class java.io.InputStream
close, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBufferSize

public int getBufferSize()
Return the size of the buffer needed to hold this streams bytes.


getFormat

public javax.sound.sampled.AudioFormat getFormat()
The returned AudioFormat holds the information about samplerate, samplesize etc, that DSAudioStream does not directly supply and can be used to construct an AudioInputStream.


available

public int available()
Overrides:
available in class java.io.InputStream

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] audioBytes)
         throws DSJException
Overrides:
read in class java.io.InputStream
Throws:
DSJException

read

public int read(byte[] audioBytes,
                int offset,
                int length)
         throws DSJException
Overrides:
read in class java.io.InputStream
Throws:
DSJException