com.jme.sound.openAL.objects.util
Class WavInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended bycom.jme.sound.openAL.objects.util.JMEAudioInputStream
              extended bycom.jme.sound.openAL.objects.util.WavInputStream

public class WavInputStream
extends JMEAudioInputStream


Field Summary
 
Fields inherited from class com.jme.sound.openAL.objects.util.JMEAudioInputStream
INVALID_OGG_MESSAGE
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
WavInputStream(java.io.InputStream _in)
           
 
Method Summary
 int channels()
           
 int depth()
           
 int getAudioChannels()
           
 int getChannels()
           
 float getLength()
           
 int length()
           
 boolean marksupported()
           
 int rate()
           
 int read(java.nio.ByteBuffer b, int off, int len)
          Reads up to len bytes of data from the input stream into a ByteBuffer.
 void readSample(byte[] b, int start, int length)
           
 void readSample(int[] b, int start, int length)
           
 void readSample(short[] b, int start, int length)
           
protected  void setLength(float time)
           
 
Methods inherited from class com.jme.sound.openAL.objects.util.JMEAudioInputStream
getFileName, setFileName
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WavInputStream

public WavInputStream(java.io.InputStream _in)
               throws java.io.IOException
Method Detail

read

public int read(java.nio.ByteBuffer b,
                int off,
                int len)
         throws java.io.IOException
Reads up to len bytes of data from the input stream into a ByteBuffer.

Specified by:
read in class JMEAudioInputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
java.io.IOException

channels

public int channels()

depth

public int depth()

rate

public int rate()
Specified by:
rate in class JMEAudioInputStream

length

public int length()

marksupported

public boolean marksupported()

readSample

public void readSample(byte[] b,
                       int start,
                       int length)
                throws java.io.IOException
Throws:
java.io.IOException

readSample

public void readSample(short[] b,
                       int start,
                       int length)
                throws java.io.IOException
Throws:
java.io.IOException

readSample

public void readSample(int[] b,
                       int start,
                       int length)
                throws java.io.IOException
Throws:
java.io.IOException

getChannels

public int getChannels()
Specified by:
getChannels in class JMEAudioInputStream
Returns:

getAudioChannels

public int getAudioChannels()
Specified by:
getAudioChannels in class JMEAudioInputStream

setLength

protected void setLength(float time)
Specified by:
setLength in class JMEAudioInputStream

getLength

public float getLength()
Specified by:
getLength in class JMEAudioInputStream