|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.openal.StreamDecoder
com.threerings.openal.OggStreamDecoder
public class OggStreamDecoder
Decodes Ogg Vorbis streams.
| Field Summary | |
|---|---|
protected com.jcraft.jorbis.Block |
_block
The output block. |
protected short[] |
_data
Intermediate storage for converted data. |
protected com.jcraft.jorbis.DspState |
_dsp
The DSP state. |
protected InputStream |
_in
The underlying input stream. |
protected com.jcraft.jorbis.Info |
_info
The stream info. |
protected int[] |
_offsets
The DSP offsets for each channel. |
protected com.jcraft.jogg.Packet |
_packet
The output packet. |
protected com.jcraft.jogg.Page |
_page
The output page. |
protected float[][][] |
_pcm
Holds the decoded PCM data buffers. |
protected com.jcraft.jogg.StreamState |
_stream
The stream state. |
protected com.jcraft.jogg.SyncState |
_sync
The sync state. |
protected static int |
BUFFER_SIZE
The decode buffer size. |
| Fields inherited from class com.threerings.openal.StreamDecoder |
|---|
_extensions |
| Constructor Summary | |
|---|---|
OggStreamDecoder()
|
|
| Method Summary | |
|---|---|
int |
getFormat()
Returns the sound format (see Stream.getFormat()). |
int |
getFrequency()
Returns the sound frequency (see Stream.getFrequency()). |
void |
init(InputStream in)
Initializes the decoder with its input stream. |
int |
read(ByteBuffer buf)
Reads as much data as will fit into the specified buffer. |
protected boolean |
readChunk()
Reads in a chunk of data from the underlying input stream. |
protected boolean |
readPacket()
Reads a packet. |
protected boolean |
readPage()
Reads in a page. |
protected int |
readSamples()
Reads a buffer's worth of samples. |
| Methods inherited from class com.threerings.openal.StreamDecoder |
|---|
createInstance, createInstance, registerExtension |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected InputStream _in
protected com.jcraft.jogg.SyncState _sync
protected com.jcraft.jogg.StreamState _stream
protected com.jcraft.jogg.Page _page
protected com.jcraft.jogg.Packet _packet
protected com.jcraft.jorbis.Info _info
protected com.jcraft.jorbis.DspState _dsp
protected com.jcraft.jorbis.Block _block
protected float[][][] _pcm
protected int[] _offsets
protected short[] _data
protected static final int BUFFER_SIZE
| Constructor Detail |
|---|
public OggStreamDecoder()
| Method Detail |
|---|
public void init(InputStream in)
throws IOException
StreamDecoder
init in class StreamDecoderIOExceptionpublic int getFormat()
StreamDecoderStream.getFormat()).
getFormat in class StreamDecoderpublic int getFrequency()
StreamDecoderStream.getFrequency()).
getFrequency in class StreamDecoder
public int read(ByteBuffer buf)
throws IOException
StreamDecoder
read in class StreamDecoderIOException
protected int readSamples()
throws IOException
IOException
protected boolean readPacket()
throws IOException
IOException
protected boolean readPage()
throws IOException
IOException
protected boolean readChunk()
throws IOException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||