aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorKari Salminen2007-08-09 17:11:38 +0000
committerKari Salminen2007-08-09 17:11:38 +0000
commit89c30c871f3819a14cb3bd79701f8a8db87509b1 (patch)
tree498eda40596013b6b38f6b97de57fa9ef2d096c9 /engines
parent03d5bbf253d5d0bc59d5cc8c48cd7524ebaa1a12 (diff)
downloadscummvm-rg350-89c30c871f3819a14cb3bd79701f8a8db87509b1.tar.gz
scummvm-rg350-89c30c871f3819a14cb3bd79701f8a8db87509b1.tar.bz2
scummvm-rg350-89c30c871f3819a14cb3bd79701f8a8db87509b1.zip
Removed old loadInstruments().
svn-id: r28506
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/sound.cpp86
1 files changed, 0 insertions, 86 deletions
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 4a4712a708..24602822f7 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -726,92 +726,6 @@ uint32 SoundMgr::mixSound(void) {
#ifdef USE_IIGS_SOUND
#if 0
-int SoundMgr::loadInstruments(char *fname) {
- Common::File fp;
- int i, j, k;
- struct SoundInstrument ai;
- int numWav;
- char *path;
-
- path = "sierrast";
-
- if (!fp.open(path))
- return errBadFileOpen;
- report("Loading samples: %s\n", path);
-
- if ((wave = malloc(0x10000 * 2)) == NULL)
- return errNotEnoughMemory;
-
- fp.read(wave, 0x10000);
- fp.close();
- for (i = 0x10000; i--;) {
- ((int16 *)wave)[i] = 2 * ((int16)wave[i] - 128);
- }
-
- fp = fopen("bla", "w");
- fwrite(wave, 2, 0x10000, fp);
- fclose(fp);
-
- report("Loading instruments: %s\n", path);
-
- if ((fp = fopen(path, "rb")) == NULL)
- return errBadFileOpen;
-
- fseek(fp, 0x8469, SEEK_SET);
-
- for (numWav = j = 0; j < 40; j++) {
- fread(&ai, 1, 32, fp);
-
- if (ai.env[0].bp > 0x7f)
- break;
-
-#if 0
- printf("Instrument %d loaded ----------------\n", j);
- printf("Envelope:\n");
- for (i = 0; i < 8; i++)
- printf("[seg %d]: BP %02x Inc %04x\n", i, ai.env[i].bp,
- ((int)ai.env[i].inc_hi << 8) | ai.env[i].inc_lo);
- printf("rel seg: %d, pri inc: %d, bend range: %d, vib dep: %d, "
- "vib spd: %d\n", ai.relseg, ai.priority,
- ai.bendrange, ai.vibdepth, ai.vibspeed);
- printf("A wave count: %d, B wave count: %d\n", ai.wac, ai.wbc);
-#endif
-
- for (k = 0; k < ai.wac; k++, num_wav++) {
- fread(&ai.wal[k], 1, 6, fp);
-#if 0
- printf("[A %d of %d] top: %02x, wave address: %02x, "
- "size: %02x, mode: %02x, relPitch: %04x\n", k + 1,
- ai.wac, ai.wal[k].top, ai.wal[k].addr, ai.wal[k].size,
- ai.wal[k].mode, ((int)ai.wal[k].rel_hi << 8) | ai.wal[k].rel_lo);
-#endif
- }
-
- for (k = 0; k < ai.wbc; k++, num_wav++) {
- fread(&ai.wbl[k], 1, 6, fp);
-#if 0
- printf("[B %d of %d] top: %02x, wave address: %02x, "
- "size: %02x, mode: %02x, relPitch: %04x\n", k + 1, ai.wbc,
- ai.wbl[k].top, ai.wbl[k].addr, ai.wbl[k].size,
- ai.wbl[k].mode, ((int)ai.wbl[k].rel_hi << 8) | ai.wbl[k].rel_lo);
-#endif
- }
- waveaddr[j] = 256 * ai.wal[0].addr;
- wavesize[j] = 256 * (1 << ((ai.wal[0].size) & 0x07));
-#if 1
- printf("%d addr = %d\n", j, waveaddr[j]);
- printf(" size = %d\n", wavesize[j]);
-#endif
- }
-
- numInstruments = j;
- printf("%d Ensoniq 5503 instruments loaded. (%d waveforms)\n", num_instruments, num_wav);
-
- fclose(fp);
-
- return errOK;
-}
-
void Sound::unloadInstruments() {
free(instruments);
}