324 |
void Sampler::Reset() { |
void Sampler::Reset() { |
325 |
// delete sampler channels |
// delete sampler channels |
326 |
try { |
try { |
327 |
SamplerChannelMap::iterator iter = mSamplerChannels.begin(); |
while (true) { |
328 |
for (; iter != mSamplerChannels.end(); iter++) { |
SamplerChannelMap::iterator iter = mSamplerChannels.begin(); |
329 |
RemoveSamplerChannel(iter->second); |
if (iter == mSamplerChannels.end()) break; |
330 |
|
RemoveSamplerChannel(iter->second); |
331 |
} |
} |
332 |
} |
} |
333 |
catch(...) { |
catch(...) { |
337 |
|
|
338 |
// delete midi input devices |
// delete midi input devices |
339 |
try { |
try { |
340 |
MidiInputDeviceMap::iterator iter = mMidiInputDevices.begin(); |
while (true) { |
341 |
for (; iter != mMidiInputDevices.end(); iter++) { |
MidiInputDeviceMap::iterator iter = mMidiInputDevices.begin(); |
342 |
DestroyMidiInputDevice(iter->second); |
if (iter == mMidiInputDevices.end()) break; |
343 |
|
DestroyMidiInputDevice(iter->second); |
344 |
} |
} |
345 |
} |
} |
346 |
catch(...) { |
catch(...) { |
350 |
|
|
351 |
// delete audio output devices |
// delete audio output devices |
352 |
try { |
try { |
353 |
AudioOutputDeviceMap::iterator iter = mAudioOutputDevices.begin(); |
while (true) { |
354 |
for (; iter != mAudioOutputDevices.end(); iter++) { |
AudioOutputDeviceMap::iterator iter = mAudioOutputDevices.begin(); |
355 |
DestroyAudioOutputDevice(iter->second); |
if (iter == mAudioOutputDevices.end()) break; |
356 |
|
DestroyAudioOutputDevice(iter->second); |
357 |
} |
} |
358 |
} |
} |
359 |
catch(...) { |
catch(...) { |