234 |
if (pEngine) { // if clause to prevent disconnect loops |
if (pEngine) { // if clause to prevent disconnect loops |
235 |
ResetInternal(); |
ResetInternal(); |
236 |
for (uint i = 0; i < 128; i++) { |
for (uint i = 0; i < 128; i++) { |
237 |
if (pMIDIKeyInfo[i].pActiveVoices) delete pMIDIKeyInfo[i].pActiveVoices; |
if (pMIDIKeyInfo[i].pActiveVoices) { |
238 |
if (pMIDIKeyInfo[i].pEvents) delete pMIDIKeyInfo[i].pEvents; |
delete pMIDIKeyInfo[i].pActiveVoices; |
239 |
|
pMIDIKeyInfo[i].pActiveVoices = NULL; |
240 |
|
} |
241 |
|
if (pMIDIKeyInfo[i].pEvents) { |
242 |
|
delete pMIDIKeyInfo[i].pEvents; |
243 |
|
pMIDIKeyInfo[i].pEvents = NULL; |
244 |
|
} |
245 |
} |
} |
246 |
Engine* oldEngine = pEngine; |
Engine* oldEngine = pEngine; |
247 |
AudioOutputDevice* oldAudioDevice = pEngine->pAudioOutputDevice; |
AudioOutputDevice* oldAudioDevice = pEngine->pAudioOutputDevice; |