/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
*
* @author Karl Helgason
*/
static private class DLSID {
long i1;
int s1;
int s2;
int x1;
int x2;
int x3;
int x4;
int x5;
int x6;
int x7;
int x8;
private DLSID() {
}
}
return d;
}
public int hashCode() {
return (int)i1;
}
return false;
}
}
}
/** X = X & Y */
/** X = X | Y */
/** X = X ^ Y */
/** X = X + Y */
/** X = X - Y */
/** X = X * Y */
/** X = X / Y */
/** X = X && Y */
/** X = X || Y */
/** X = (X < Y) */
/** X = (X <= Y) */
/** X = (X > Y) */
/** X = (X >= Y) */
/** X = (X == Y) */
/** X = !X */
/** 32-bit constant */
/** 32-bit value returned from query */
/** 32-bit value returned from query */
0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
0x4689, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
0xa4bf, 0x11d2, 0xbb, 0xdf, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
private boolean largeFormat = false;
public DLSSoundbank() {
}
try {
} finally {
}
}
largeFormat = true;
sampleFile = file;
try {
} finally {
}
}
}
throw new RIFFInvalidFormatException(
"Input stream is not a valid RIFF stream!");
}
throw new RIFFInvalidFormatException(
"Input stream is not a valid DLS soundbank!");
}
while (riff.hasNextChunk()) {
} else {
if (!readCdlChunk(chunk)) {
throw new RIFFInvalidFormatException(
"DLS file isn't supported!");
}
}
// skipped because we will load the entire bank into memory
// long instrumentcount = chunk.readUnsignedInt();
// System.out.println("instrumentcount = "+ instrumentcount);
}
// Pool Table Chunk
// skipped because we will load the entire bank into memory
}
}
}
}
}
}
}
return 1;
return 0;
return 0;
return 1;
return 1;
return 0;
return 0;
return 44100;
return 0;
}
// Reading cdl-ck Chunk
// "cdl " chunk can only appear inside : DLS,lart,lar2,rgn,rgn2
long x;
long y;
switch (opcode) {
case DLS_CDL_AND:
break;
case DLS_CDL_OR:
break;
case DLS_CDL_XOR:
break;
case DLS_CDL_ADD:
break;
case DLS_CDL_SUBTRACT:
break;
case DLS_CDL_MULTIPLY:
break;
case DLS_CDL_DIVIDE:
break;
case DLS_CDL_LOGICAL_AND:
break;
case DLS_CDL_LOGICAL_OR:
break;
case DLS_CDL_LT:
break;
case DLS_CDL_LE:
break;
case DLS_CDL_GT:
break;
case DLS_CDL_GE:
break;
case DLS_CDL_EQ:
break;
case DLS_CDL_NOT:
break;
case DLS_CDL_CONST:
break;
case DLS_CDL_QUERY:
break;
case DLS_CDL_QUERYSUPPORTED:
break;
default:
break;
}
}
return false;
}
while (riff.hasNextChunk()) {
}
}
while (riff.hasNextChunk()) {
}
}
}
while (riff.hasNextChunk()) {
}
while (chunk.hasNextChunk()) {
}
// support for DLS level 2 regions
}
}
}
}
while (chunk.hasNextChunk()) {
if (!readCdlChunk(chunk)) {
break;
}
}
}
}
// support for DLS level 2 ART
while (chunk.hasNextChunk()) {
if (!readCdlChunk(chunk)) {
break;
}
}
}
}
} else {
}
//System.out.println("bank="+bank+" drumkit="+drumkit
// +" id="+id);
}
}
}
}
throws IOException {
for (int i = 0; i < count; i++) {
}
}
throws IOException {
for (int i = 0; i < count; i++) {
}
}
throws IOException {
while (riff.hasNextChunk()) {
while (chunk.hasNextChunk()) {
if (!readCdlChunk(chunk)) {
break;
}
}
}
}
// support for DLS level 2 ART
while (chunk.hasNextChunk()) {
if (!readCdlChunk(chunk)) {
break;
}
}
}
}
} else {
if (!readCdlChunk(chunk))
return false;
}
}
}
}
}
}
return true;
}
throws IOException {
if (size > 20)
for (int i = 0; i < loops; i++) {
if (size2 > 16)
}
}
throws IOException {
while (riff.hasNextChunk()) {
}
}
}
while (riff.hasNextChunk()) {
}
}
}
while (riff.hasNextChunk()) {
}
} else {
}
throw new RIFFInvalidDataException(
"Only PCM samples are supported!");
}
// bytes per sec
// block align, framesize
if (sampleformat == 1) {
if (bits == 8) {
audioformat = new AudioFormat(
} else {
audioformat = new AudioFormat(
}
}
if (sampleformat == 3) {
audioformat = new AudioFormat(
}
}
if (largeFormat) {
} else {
// chunk.read(buffer);
int read = 0;
read += 65536;
} else {
}
}
}
}
}
}
}
}
throws IOException {
while (riff.hasNextChunk()) {
}
}
}
}
}
}
}
}
// small cheat, we are going to rewrite data back in wvpl
writer.setWriteOverride(true);
writer.setWriteOverride(false);
}
throws IOException {
boolean convert_needed = false;
convert_needed = true;
}
} else {
convert_needed = true;
}
if (bigEndian) {
bigEndian = false;
convert_needed = true;
}
}
if (convert_needed) {
}
// fmt
int sampleformat = 0;
sampleformat = 1;
sampleformat = 1;
sampleformat = 3;
if (convert_needed) {
byte[] buff = new byte[1024];
int ret;
}
} else {
/*
data_chunk.write(databuff.array(),
databuff.arrayOffset(),
databuff.capacity());
*/
}
}
}
}
throws IOException {
int art1_count = 0;
int art2_count = 0;
art1_count++;
art2_count++;
}
art1_count++;
art2_count++;
}
}
int version = 1;
if (art2_count > 0)
version = 2;
}
int art1_count = 0;
int art2_count = 0;
art1_count++;
art2_count++;
}
if (art1_count > 0) {
}
}
}
if (art2_count > 0) {
}
}
}
}
throws IOException {
if (version == 1)
if (version == 2)
return;
}
}
}
}
}
return;
len++;
}
}
return info;
}
}
}
}
}
}
}
}
int j = 0;
return resources;
}
return inslist_array;
}
}
boolean percussion = false;
if (patch instanceof ModelPatch)
boolean percussion2 = false;
if (patch2 instanceof ModelPatch)
if (percussion == percussion2)
return instrument;
}
}
return null;
}
if (resource instanceof DLSInstrument)
}
if (resource instanceof DLSInstrument)
}
}
}
public long getMajor() {
return major;
}
}
public long getMinor() {
return minor;
}
}
}