/[svn]/linuxsampler/trunk/src/Sampler.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/Sampler.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1765 by persson, Sat Sep 6 16:44:42 2008 UTC revision 1777 by persson, Mon Sep 15 16:58:10 2008 UTC
# Line 550  namespace LinuxSampler { Line 550  namespace LinuxSampler {
550          for (; iter != mAudioOutputDevices.end(); iter++) {          for (; iter != mAudioOutputDevices.end(); iter++) {
551              if (iter->second == pDevice) {              if (iter->second == pDevice) {
552                  // check if there are still sampler engines connected to this device                  // check if there are still sampler engines connected to this device
553                  for (uint i = 0; i < SamplerChannels(); i++)                  for (SamplerChannelMap::iterator iterChan = mSamplerChannels.begin();
554                      if (GetSamplerChannel(i)->GetAudioOutputDevice() == pDevice) throw Exception("Sampler channel " + ToString(i) + " is still connected to the audio output device.");                       iterChan != mSamplerChannels.end(); iterChan++)
555                        if (iterChan->second->GetAudioOutputDevice() == pDevice) throw Exception("Sampler channel " + ToString(iterChan->first) + " is still connected to the audio output device.");
556    
557                  // disable device                  // disable device
558                  pDevice->Stop();                  pDevice->Stop();
# Line 573  namespace LinuxSampler { Line 574  namespace LinuxSampler {
574          for (; iter != mMidiInputDevices.end(); iter++) {          for (; iter != mMidiInputDevices.end(); iter++) {
575              if (iter->second == pDevice) {              if (iter->second == pDevice) {
576                  // check if there are still sampler engines connected to this device                  // check if there are still sampler engines connected to this device
577                  for (uint i = 0; i < SamplerChannels(); i++)                  for (SamplerChannelMap::iterator iterChan = mSamplerChannels.begin();
578                      if (GetSamplerChannel(i)->GetMidiInputDevice() == pDevice) throw Exception("Sampler channel " + ToString(i) + " is still connected to the midi input device.");                       iterChan != mSamplerChannels.end(); iterChan++)
579                        if (iterChan->second->GetMidiInputDevice() == pDevice) throw Exception("Sampler channel " + ToString(iterChan->first) + " is still connected to the midi input device.");
580    
581                  fireMidiDeviceToBeDestroyed(pDevice);                  fireMidiDeviceToBeDestroyed(pDevice);
582    

Legend:
Removed from v.1765  
changed lines
  Added in v.1777

  ViewVC Help
Powered by ViewVC