public class CodecIBXM
extends java.lang.Object
implements paulscode.sound.ICodec
| Constructor and Description |
|---|
CodecIBXM()
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.
|
javax.sound.sampled.AudioFormat |
getAudioFormat()
Returns the audio format of the data being returned by the read() and
readAll() methods.
|
boolean |
initialize(java.net.URL url)
Prepares an audio stream to read from.
|
boolean |
initialized()
Returns false if the stream is busy initializing.
|
paulscode.sound.SoundBuffer |
read()
Reads in one stream buffer worth of audio data.
|
paulscode.sound.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 paulscode.sound.ICodecb - True if the calling audio library requires byte-reversal.public boolean initialize(java.net.URL url)
initialize in interface paulscode.sound.ICodecurl - URL to an audio file to stream from.public boolean initialized()
initialized in interface paulscode.sound.ICodecpublic paulscode.sound.SoundBuffer read()
SoundSystemConfig for more
information about accessing and changing default settings.read in interface paulscode.sound.ICodecpublic paulscode.sound.SoundBuffer readAll()
SoundSystemConfig for more
information about accessing and changing default settings.readAll in interface paulscode.sound.ICodecpublic boolean endOfStream()
endOfStream in interface paulscode.sound.ICodecpublic void cleanup()
cleanup in interface paulscode.sound.ICodecpublic javax.sound.sampled.AudioFormat getAudioFormat()
getAudioFormat in interface paulscode.sound.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.