|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpaulscode.sound.codecs.CodecJOgg
public class CodecJOgg
The CodecJOgg class provides an ICodec interface to the external J-Ogg
library.
This software is based on or using the J-Ogg library available from
http://www.j-ogg.de and copyrighted by Tor-Einar Jarnbjo.
J-Ogg License:
You are free to use, modify, resdistribute or include this software in your
own free or commercial software. The only restriction is, that you make it
obvious that your software is based on J-Ogg by including this notice in the
documentation, about box or whereever you feel apropriate:
"This software is based on or using the J-Ogg library available from
http://www.j-ogg.de and copyrighted by Tor-Einar Jarnbjo."
SoundSystem CodecJOgg License:
You are free to use this class for any purpose, commercial or otherwise.
You may modify this class or source code, and distribute it any way you
like, provided the following conditions are met:
1) You must abide by the conditions of the aforementioned J-Ogg License.
2) You may not falsely claim to be the author of this class or any
unmodified portion of it.
3) You may not copyright this class or a modified version of it and then
sue me for copyright infringement.
4) If you modify the source code, you must clearly document the changes
made before redistributing the modified source code, so other users know
it is not the original code.
5) You are not required to give me credit for this class in any derived
work, but if you do, you must also mention my website:
http://www.paulscode.com
6) I the author will not be responsible for any damages (physical,
financial, or otherwise) caused by the use if this class or any portion
of it.
7) I the author do not guarantee, warrant, or make any representations,
either expressed or implied, regarding the use of this class or any
portion of it.
Author: Paul Lamb
http://www.paulscode.com
| Constructor Summary | |
|---|---|
CodecJOgg()
Constructor: Grabs a handle to the logger. |
|
| Method Summary | |
|---|---|
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CodecJOgg()
| Method Detail |
|---|
public void reverseByteOrder(boolean b)
reverseByteOrder in interface ICodecb - True if the calling audio library requires byte-reversal.public boolean initialize(java.net.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.
read in interface ICodecpublic SoundBuffer readAll()
SoundSystemConfig for more
information about accessing and changing default settings.
readAll in interface ICodecpublic boolean endOfStream()
endOfStream in interface ICodecpublic void cleanup()
cleanup in interface ICodecpublic javax.sound.sampled.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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||