Class OggVorbisDecoder
java.lang.Object
games.stendhal.client.sound.system.SignalProcessor
games.stendhal.client.sound.system.processors.OggVorbisDecoder
- Author:
- silvio
-
Constructor Summary
ConstructorDescriptionOggVorbisDecoder(InputStream stream, int inputBufferSize, int outputNumSamplesPerChannel)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected boolean
generate()
This function should be overwritten by all classes that want to generate an PCM audio stream e.g.int
protected float[]
int
protected void
init(InputStream stream, int inputBufferSize, int outputNumSamplesPerChannel)
void
open(InputStream stream, int inputBufferSize, int outputNumSamplesPerChannel)
boolean
protected int
read()
protected boolean
protected com.jcraft.jogg.Packet
readPacket(boolean ignoreHoles)
protected com.jcraft.jogg.Page
readPage(boolean ignoreHoles, boolean updateStreamState)
Methods inherited from class games.stendhal.client.sound.system.SignalProcessor
connectTo, createChain, disconnect, finished, insert, modify, propagate, quit, replace, request, split
-
Constructor Details
-
OggVorbisDecoder
public OggVorbisDecoder(InputStream stream, int inputBufferSize, int outputNumSamplesPerChannel) throws IOException- Throws:
IOException
-
-
Method Details
-
init
protected final void init(InputStream stream, int inputBufferSize, int outputNumSamplesPerChannel) throws IOException- Throws:
IOException
-
readPage
protected com.jcraft.jogg.Page readPage(boolean ignoreHoles, boolean updateStreamState) throws IOException- Throws:
IOException
-
readPacket
- Throws:
IOException
-
readHeader
- Throws:
IOException
-
read
- Throws:
IOException
-
getOutputBuffer
protected float[] getOutputBuffer() -
generate
protected boolean generate()Description copied from class:SignalProcessor
This function should be overwritten by all classes that want to generate an PCM audio stream e.g. a mp3 decoder, a frequency generator, ...- Overrides:
generate
in classSignalProcessor
- Returns:
true
, until the stream is finished
-
getNumChannels
public int getNumChannels() -
getSampleRate
public int getSampleRate() -
reachedEndOfStream
public boolean reachedEndOfStream() -
open
public void open(InputStream stream, int inputBufferSize, int outputNumSamplesPerChannel) throws IOException- Throws:
IOException
-
close
public void close()
-