public class CodecWav extends Object implements ICodec
| Constructor and Description |
|---|
CodecWav()
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)
This method is ignored by CodecWav, because it produces "nice" data.
|
public void reverseByteOrder(boolean b)
reverseByteOrder in interface ICodecb - True if the calling audio library requires byte-reversal from certain codecspublic boolean initialize(URL url)
initialize in interface ICodecurl - URL to an audio 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 ICodecCopyright © 2017. All rights reserved.