@Environment(value=CLIENT) public class OggAudioStream extends Object implements AudioStream
Modifier and Type | Class and Description |
---|---|
(package private) static class |
OggAudioStream.ChannelList |
Modifier and Type | Field and Description |
---|---|
private ByteBuffer |
buffer |
private AudioFormat |
format |
private InputStream |
inputStream |
private long |
pointer |
Constructor and Description |
---|
OggAudioStream(InputStream inputStream) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ByteBuffer |
getBuffer() |
ByteBuffer |
getBuffer(int size) |
AudioFormat |
getFormat() |
private void |
increaseBufferSize() |
private void |
readChannels(FloatBuffer floatBuffer,
FloatBuffer floatBuffer2,
OggAudioStream.ChannelList channelList) |
private void |
readChannels(FloatBuffer floatBuffer,
OggAudioStream.ChannelList channelList) |
private boolean |
readHeader() |
private boolean |
readOggFile(OggAudioStream.ChannelList channelList) |
private long pointer
private final AudioFormat format
private final InputStream inputStream
private ByteBuffer buffer
public OggAudioStream(InputStream inputStream) throws IOException
IOException
private boolean readHeader() throws IOException
IOException
private void increaseBufferSize()
private boolean readOggFile(OggAudioStream.ChannelList channelList) throws IOException
IOException
private void readChannels(FloatBuffer floatBuffer, OggAudioStream.ChannelList channelList)
private void readChannels(FloatBuffer floatBuffer, FloatBuffer floatBuffer2, OggAudioStream.ChannelList channelList)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public AudioFormat getFormat()
getFormat
in interface AudioStream
public ByteBuffer getBuffer(int size) throws IOException
getBuffer
in interface AudioStream
IOException
public ByteBuffer getBuffer() throws IOException
IOException