/[svn]/linuxsampler/trunk/src/engines/FxSend.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/FxSend.cpp

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

revision 2137 by schoenebeck, Mon Oct 4 12:20:23 2010 UTC revision 2198 by iliev, Sun Jul 3 18:06:51 2011 UTC
# Line 88  namespace LinuxSampler { Line 88  namespace LinuxSampler {
88    
89      void FxSend::SetDestinationEffect(int iChain, int iChainPos) throw (Exception) {      void FxSend::SetDestinationEffect(int iChain, int iChainPos) throw (Exception) {
90          AudioOutputDevice* pDevice = pEngineChannel->GetAudioOutputDevice();          AudioOutputDevice* pDevice = pEngineChannel->GetAudioOutputDevice();
91          if (iChain < 0 || iChain >= pDevice->SendEffectChainCount())          bool chainFound = false;
92              throw Exception(          if (iChain != -1) {
93                if (pDevice->SendEffectChainByID(iChain) != NULL)  chainFound = true;
94                if (!chainFound) throw Exception(
95                  "Could not assign FX Send to send effect chain " +                  "Could not assign FX Send to send effect chain " +
96                  ToString(iChain) + ": effect chain doesn't exist."                  ToString(iChain) + ": effect chain doesn't exist."
97              );              );
98          if (iChainPos < 0 || iChainPos >= pDevice->SendEffectChain(iChain)->EffectCount())          }
99            if (chainFound && (iChainPos < 0 || iChainPos >= pDevice->SendEffectChainByID(iChain)->EffectCount()))
100              throw Exception(              throw Exception(
101                  "Could not assign FX Send to send effect chain position " +                  "Could not assign FX Send to send effect chain position " +
102                  ToString(iChainPos) + " of send effect chain " + ToString(iChain) +                  ToString(iChainPos) + " of send effect chain " + ToString(iChain) +
103                  ": effect chain position out of bounds."                  ": effect chain position out of bounds."
104              );              );
105          iDestinationEffectChain    = iChain;          iDestinationEffectChain    = iChain;
106          iDestinationEffectChainPos = iChainPos;          iDestinationEffectChainPos = (iChain == -1 ? -1 : iChainPos);
107      }      }
108    
109      // TODO: to be removed      // TODO: to be removed

Legend:
Removed from v.2137  
changed lines
  Added in v.2198

  ViewVC Help
Powered by ViewVC