private static class OggVorbisDecoderFactory.OggStream
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
private javax.sound.sampled.AudioFormat |
audioFormat |
private int |
bufCount |
private static int |
BUFSIZ |
private byte[] |
convBuf |
private static java.lang.String |
EOS |
private java.io.InputStream |
inputStream |
private int |
offset |
private com.jcraft.jogg.Packet |
oggPacket |
private com.jcraft.jogg.Page |
oggPage |
private com.jcraft.jogg.StreamState |
oggStreamState |
private com.jcraft.jogg.SyncState |
oggSyncState |
private com.jcraft.jorbis.Block |
orbisBlock |
private com.jcraft.jorbis.Comment |
orbisComment |
private com.jcraft.jorbis.DspState |
orbisDspState |
private com.jcraft.jorbis.Info |
orbisInfo |
private float[][][] |
pcmData |
private int[] |
pcmi |
| Constructor and Description |
|---|
OggStream(java.io.InputStream inputStream) |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Gets the amount of data available to be read right now.
|
void |
close() |
private int |
decodePacket(int samples)
Decode the PCM data.
|
int |
getBody(java.io.InputStream is)
Refills the conversion buffer.
|
javax.sound.sampled.AudioFormat |
getFormat() |
private java.lang.String |
getHeader()
Gets the OGG header (first three packets) which must contain vorbis
audio content.
|
private java.lang.String |
getInput()
Gets another chunk of input into the oggSyncState.
|
private java.lang.String |
getPage()
Gets the next page from the oggSyncState into the oggStreamState.
|
int |
read() |
int |
read(byte[] buf) |
int |
read(byte[] buf,
int n)
Reads into the supplied buffer.
|
void |
reset() |
long |
skip(long n)
Skips a number of bytes.
|
private static final java.lang.String EOS
private static final int BUFSIZ
private final com.jcraft.jogg.Packet oggPacket
private final com.jcraft.jogg.Page oggPage
private final com.jcraft.jogg.StreamState oggStreamState
private final com.jcraft.jogg.SyncState oggSyncState
private final com.jcraft.jorbis.DspState orbisDspState
private final com.jcraft.jorbis.Block orbisBlock
private final com.jcraft.jorbis.Comment orbisComment
private final com.jcraft.jorbis.Info orbisInfo
private final javax.sound.sampled.AudioFormat audioFormat
private final byte[] convBuf
private int bufCount
private int offset
private int[] pcmi
private float[][][] pcmData
private java.io.InputStream inputStream
public OggStream(java.io.InputStream inputStream)
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreampublic javax.sound.sampled.AudioFormat getFormat()
public int available()
available in class java.io.InputStreampublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf,
int n)
throws java.io.IOException
buf - The buffer to read to.n - The number of bytes to read.java.io.IOException - if JOrbis loses.public long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamn - The number of bytes to skip.java.io.IOExceptionpublic void reset()
reset in class java.io.InputStreamprivate java.lang.String getHeader()
private java.lang.String getInput()
private java.lang.String getPage()
public int getBody(java.io.InputStream is)
private int decodePacket(int samples)