public class CodecJOgg extends Object implements ICodec
| Constructor and Description |
|---|
CodecJOgg()
Constructor: Grabs a handle to the logger.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Closes the audio stream and remove references to all instantiated objects.
|
boolean |
endOfStream()
Returns false if there is still more data available to be read in.
|
AudioFormat |
getAudioFormat()
Returns the audio format of the data being returned by the read() and
readAll() methods.
|
boolean |
initialize(URL url)
Prepares an audio stream to read from.
|
boolean |
initialized()
Returns false if the stream is busy initializing.
|
SoundBuffer |
read()
Reads in one stream buffer worth of audio data.
|
SoundBuffer |
readAll()
Reads in all the audio data from the stream (up to the default
"maximum file size".
|
void |
reverseByteOrder(boolean b)
Tells this codec when it will need to reverse the byte order of
the data before returning it in the read() and readAll() methods.
|
static void |
reverseBytes(byte[] buffer)
Reverse-orders all bytes contained in the specified array.
|
static void |
reverseBytes(byte[] buffer,
int offset,
int size)
Reverse-orders the specified range of bytes contained in the specified array.
|
public void reverseByteOrder(boolean b)
reverseByteOrder in interface ICodecb - True if the calling audio library requires byte-reversal.public boolean initialize(URL url)
initialize in interface ICodecurl - URL to an ogg file to stream from.public boolean initialized()
initialized in interface ICodecpublic SoundBuffer read()
SoundSystemConfig for more
information about accessing and changing default settings.public SoundBuffer readAll()
SoundSystemConfig for more
information about accessing and changing default settings.public boolean endOfStream()
endOfStream in interface ICodecpublic void cleanup()
public AudioFormat getAudioFormat()
getAudioFormat in interface ICodecpublic static void reverseBytes(byte[] buffer)
buffer - Array containing audio data.public static void reverseBytes(byte[] buffer,
int offset,
int size)
buffer - Array containing audio data.offset - Array index to begin.size - number of bytes to reverse-order.Copyright © 2017. All rights reserved.