资 源 简 介
Compilation of several sources into one jar to simplify OGG Vorbis files play with OpenAL.
(version 1.1 compatible with Java 1.5)
Example of use:
```
// Create OGG Decoder
OggDecoder oggDecoder = new OggDecoder();
// Decode OGG into PCM
InputStream inputStream = new ByteArrayInputStream(bytes);
oggData = oggDecoder.getData(inputStream);
// Load PCM data into buffer
AL10.alBufferData(
bufferId,
oggData.channels>1?
AL10.ALFORMATSTEREO16 : AL10.ALFORMATMONO16,
oggData.data,
oggData.rate);
if (AL10.alGetError() != AL10.ALNOERROR) {
//Error check
}
```
Special thanks to jcraft"s people and Kevin Glass for this library.
Issues in versions 1.0 and 1.1:
Problems decoding lower bit-rates (like 8kHz) - change static ints 4096 everywhere in the code to 512 (all java files) or lower values (64, 128). Unfortunately, the jorbis libs have 4096 block size hardcoded and