[Scummvm-cvs-logs] SF.net SVN: scummvm: [28506] scummvm/trunk/engines/agi/sound.cpp

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Thu Aug 9 19:11:38 CEST 2007


Revision: 28506
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28506&view=rev
Author:   buddha_
Date:     2007-08-09 10:11:38 -0700 (Thu, 09 Aug 2007)

Log Message:
-----------
Removed old loadInstruments().

Modified Paths:
--------------
    scummvm/trunk/engines/agi/sound.cpp

Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp	2007-08-09 17:07:36 UTC (rev 28505)
+++ scummvm/trunk/engines/agi/sound.cpp	2007-08-09 17:11:38 UTC (rev 28506)
@@ -726,92 +726,6 @@
 #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);
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list