aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/sound/music.cpp121
-rw-r--r--engines/sci/sound/music.h8
2 files changed, 0 insertions, 129 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index bc2d286a5b..d7642d10b7 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -158,127 +158,6 @@ void SciMusic::sortPlayList() {
MusicEntry ** pData = _playList.begin();
qsort(pData, _playList.size(), sizeof(MusicEntry *), &f_compare);
}
-
-#if 0
-void SciMusic::patchSysEx(byte * addr, byte *pdata, int len) {
- byte *buff = new byte[7 + len + 1];
- uint16 chk = 0;
- int i;
-
- buff[0] = 0x41;
- buff[1] = 0x10;
- buff[2] = 0x16;
- buff[3] = 0x12;
- buff[4] = addr[0];
- buff[5] = addr[1];
- buff[6] = addr[2];
- for (i = 0; i < len; i++) {
- buff[7 + i] = pdata[i];
- chk += pdata[i];
- }
- chk += addr[0] + addr[1] + addr[2];
- buff[7 + i] = 128 - chk % 128;
- _pMidiDrv->sysEx(buff, len + 8);
- delete[] buff;
-}
-
-void SciMusic::patchUpdateAddr(byte *addr, int len) {
- addr[2] += len;
- if (addr[2] >= 0x7F) {
- addr[1]++;
- addr[2] -= 0x80;
- }
-}
-#endif
-
-// FIXME: This should be done at the driver level
-#if 0
-void SciMusic::loadPatch() {
- if (_midiType == MD_MT32)
- loadPatchMT32();
-}
-#endif
-
-#if 0
-// currently loads patch 1.pat for Roland/MT-32 device
-void SciMusic::loadPatchMT32() {
- //byte sysText[] = { 0x20, 0, 0 };
- byte sysMem[] = { 0x5, 0, 0 }; // patch memory
- byte sysRhytm[] = { 0x3, 0x1, 0x10 }; // rhytm
- byte sysMsg3[15] = { 0x41, 0x10, 0x16, 0x12, 0x52, 0, 0xA, 0x16, 0x16,
- 0x16, 0x16, 0x16, 0x16, 0x20, 0x80 };
- byte sysTimbre[] = { 0x8, 0, 0 }; // timbre memory
- byte sysSystem[] = { 0x10, 0, 4 }; // partial reserve & midi channel
- byte arr[3][11];
-
- Resource *res = ((SciEngine *)g_engine)->getResourceManager()->findResource(ResourceId(kResourceTypePatch, 1), 0);
-
- if (res) {
- byte *pData = res->data, *p;
- // welcome message
- //patchSysEx(sysText, pData + 20, 20);
- // reading reverb mode, time and level
- p = pData + 74;
- for (int i = 0; i < 11; i++) {
- arr[0][i] = *p++;
- arr[1][i] = *p++;
- arr[2][i] = *p++;
- }
- // sub_657 - patch memory
- for (int i = 0; i < 48; i++) {
- patchSysEx(sysMem, p, 8);
- patchUpdateAddr(sysMem, 8);
- p += 8;
- }
- // sub_696 - timbre
- byte dl = *p++, cl = 0;
- while (dl--) {
- patchSysEx(sysTimbre, p, 14); // common area
- patchUpdateAddr(sysTimbre, 14);
- patchSysEx(sysTimbre, p + 14, 58);// partial 1
- patchUpdateAddr(sysTimbre, 58);
- patchSysEx(sysTimbre, p + 72, 58);// partial 2
- patchUpdateAddr(sysTimbre, 58);
- patchSysEx(sysTimbre, p + 130, 58);// partial 3
- patchUpdateAddr(sysTimbre, 58);
- patchSysEx(sysTimbre, p + 188, 58);// partial 4
- patchUpdateAddr(sysTimbre, 58);
- p += 246;
- cl += 2;
- sysTimbre[1] = cl;
- sysTimbre[2] = 0;
- }
- // patch memory or rhytm
- uint16 flag = READ_BE_UINT16(p);
- p += 2;
- if (flag == 0xABCD) {
- // sub_657
- for (int i = 0; i < 48; i++) {
- patchSysEx(sysMem, p, 8);
- patchUpdateAddr(sysMem, 8);
- p += 8;
- }
- } else if (flag == 0xDCBA) {
- // sub_756
- for (int i = 0; i < 64; i++) {
- patchSysEx(sysRhytm, p, 4);
- patchUpdateAddr(sysRhytm, 4);
- p += 4;
- }
- patchSysEx(sysSystem, p, 18);
- }
- // after-init text message
- //patchSysEx(sysText, pData, 20);
- // some final sysex
- _pMidiDrv->sysEx(sysMsg3, 15);
- // releasing patch resource
- //g_sci->ResMgr.ResUnload(SCI_RES_PATCH, 1);
- debug("MT-32 patch loaded");
- }
-}
-#endif
-
-
void SciMusic::soundInitSnd(MusicEntry *pSnd) {
SoundResource::Track *track = NULL;
int channelFilterMask = 0;
diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h
index 4edb7b9099..b6c4a21308 100644
--- a/engines/sci/sound/music.h
+++ b/engines/sci/sound/music.h
@@ -137,9 +137,6 @@ public:
~SciMusic();
void init();
-#if 0
- void loadPatch();
-#endif
void onTimer();
void clearPlayList();
@@ -205,11 +202,6 @@ public:
protected:
byte findAudEntry(uint16 nAud, byte&oVolume, uint32& oOffset, uint32&oSize);
void sortPlayList();
-#if 0
- void loadPatchMT32();
- void patchSysEx(byte * addr, byte *pdata, int len);
- void patchUpdateAddr(byte *addr, int len);
-#endif
SciVersion _soundVersion;