77 |
|
|
78 |
Engine::~Engine() { |
Engine::~Engine() { |
79 |
if (pDiskThread) { |
if (pDiskThread) { |
80 |
|
dmsg(1,("Stopping disk thread...")); |
81 |
pDiskThread->StopThread(); |
pDiskThread->StopThread(); |
82 |
delete pDiskThread; |
delete pDiskThread; |
83 |
|
dmsg(1,("OK\n")); |
84 |
} |
} |
85 |
|
|
86 |
|
if (pInstrument) Instruments.HandBack(pInstrument, this); |
87 |
|
|
88 |
if (pGig) delete pGig; |
if (pGig) delete pGig; |
89 |
if (pRIFF) delete pRIFF; |
if (pRIFF) delete pRIFF; |
90 |
for (uint i = 0; i < 128; i++) { |
for (uint i = 0; i < 128; i++) { |
94 |
for (uint i = 0; i < Event::destination_count; i++) { |
for (uint i = 0; i < Event::destination_count; i++) { |
95 |
if (pSynthesisEvents[i]) delete pSynthesisEvents[i]; |
if (pSynthesisEvents[i]) delete pSynthesisEvents[i]; |
96 |
} |
} |
|
delete[] pSynthesisEvents; |
|
97 |
if (pEvents) delete pEvents; |
if (pEvents) delete pEvents; |
98 |
if (pCCEvents) delete pCCEvents; |
if (pCCEvents) delete pCCEvents; |
99 |
if (pEventQueue) delete pEventQueue; |
if (pEventQueue) delete pEventQueue; |
100 |
if (pEventPool) delete pEventPool; |
if (pEventPool) delete pEventPool; |
101 |
if (pVoicePool) delete pVoicePool; |
if (pVoicePool) { |
102 |
|
pVoicePool->clear(); |
103 |
|
delete pVoicePool; |
104 |
|
} |
105 |
if (pActiveKeys) delete pActiveKeys; |
if (pActiveKeys) delete pActiveKeys; |
106 |
if (pSysexBuffer) delete pSysexBuffer; |
if (pSysexBuffer) delete pSysexBuffer; |
107 |
if (pEventGenerator) delete pEventGenerator; |
if (pEventGenerator) delete pEventGenerator; |
329 |
|
|
330 |
// (re)create disk thread |
// (re)create disk thread |
331 |
if (this->pDiskThread) { |
if (this->pDiskThread) { |
332 |
|
dmsg(1,("Stopping disk thread...")); |
333 |
this->pDiskThread->StopThread(); |
this->pDiskThread->StopThread(); |
334 |
delete this->pDiskThread; |
delete this->pDiskThread; |
335 |
|
dmsg(1,("OK\n")); |
336 |
} |
} |
337 |
this->pDiskThread = new DiskThread(((pAudioOut->MaxSamplesPerCycle() << MAX_PITCH) << 1) + 6); //FIXME: assuming stereo |
this->pDiskThread = new DiskThread(((pAudioOut->MaxSamplesPerCycle() << MAX_PITCH) << 1) + 6); //FIXME: assuming stereo |
338 |
if (!pDiskThread) { |
if (!pDiskThread) { |
1174 |
} |
} |
1175 |
|
|
1176 |
String Engine::Version() { |
String Engine::Version() { |
1177 |
String s = "$Revision: 1.19 $"; |
String s = "$Revision: 1.21 $"; |
1178 |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
1179 |
} |
} |
1180 |
|
|