Path: blob/master/SLICK_HOME/src/org/newdawn/slick/openal/AudioInputStream.java
1461 views
package org.newdawn.slick.openal;12import java.io.IOException;34/**5* The description of an input stream that supplied audio data suitable for6* use in OpenAL buffers7*8* @author kevin9*/10interface AudioInputStream {11/**12* Get the number of channels used by the audio13*14* @return The number of channels used by the audio15*/16public int getChannels();1718/**19* The play back rate described in the underling audio file20*21* @return The playback rate22*/23public int getRate();2425/**26* Read a single byte from the stream27*28* @return The single byte read29* @throws IOException Indicates a failure to read the underlying media30* @see java.io.InputStream#read()31*/32public int read() throws IOException;3334/**35* Read up to data.length bytes from the stream36*37* @param data The array to read into38* @return The number of bytes read or -1 to indicate no more bytes are available39* @throws IOException Indicates a failure to read the underlying media40* @see java.io.InputStream#read(byte[])41*/42public int read(byte[] data) throws IOException;4344/**45* Read up to len bytes from the stream46*47* @param data The array to read into48* @param ofs The offset into the array at which to start writing49* @param len The maximum number of bytes to read50* @return The number of bytes read or -1 to indicate no more bytes are available51* @throws IOException Indicates a failure to read the underlying media52* @see java.io.InputStream#read(byte[], int, int)53*/54public int read(byte[] data, int ofs, int len) throws IOException;5556/**57* Check if the stream is at the end, i.e. end of file or URL58*59* @return True if the stream has no more data available60*/61public boolean atEnd();6263/**64* Close the stream65*66* @see java.io.InputStream#close()67* @throws IOException Indicates a failure to access the resource68*/69public void close() throws IOException;70}717273