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

Diff of /linuxsampler/trunk/src/engines/common/AbstractVoice.cpp

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

revision 2219 by iliev, Thu Jul 28 12:35:49 2011 UTC revision 2296 by iliev, Thu Dec 8 20:03:47 2011 UTC
# Line 318  namespace LinuxSampler { Line 318  namespace LinuxSampler {
318          const bool bVoiceRequiresDedicatedRouting =          const bool bVoiceRequiresDedicatedRouting =
319              pEngineChannel->GetFxSendCount() > 0 &&              pEngineChannel->GetFxSendCount() > 0 &&
320              (pMidiKeyInfo->ReverbSend || pMidiKeyInfo->ChorusSend);              (pMidiKeyInfo->ReverbSend || pMidiKeyInfo->ChorusSend);
321            
322          if (bVoiceRequiresDedicatedRouting) {          const bool bEq =
323                pSignalUnitRack != NULL && pSignalUnitRack->HasEq() && GetEngine()->pEq->HasSupport();
324    
325            if (bEq) {
326                GetEngine()->pEq->GetInChannelLeft()->Clear();
327                GetEngine()->pEq->GetInChannelRight()->Clear();
328                finalSynthesisParameters.pOutLeft  = &GetEngine()->pEq->GetInChannelLeft()->Buffer()[Skip];
329                finalSynthesisParameters.pOutRight = &GetEngine()->pEq->GetInChannelRight()->Buffer()[Skip];
330                pSignalUnitRack->UpdateEqSettings(GetEngine()->pEq);
331            } else if (bVoiceRequiresDedicatedRouting) {
332              finalSynthesisParameters.pOutLeft  = &GetEngine()->pDedicatedVoiceChannelLeft->Buffer()[Skip];              finalSynthesisParameters.pOutLeft  = &GetEngine()->pDedicatedVoiceChannelLeft->Buffer()[Skip];
333              finalSynthesisParameters.pOutRight = &GetEngine()->pDedicatedVoiceChannelRight->Buffer()[Skip];              finalSynthesisParameters.pOutRight = &GetEngine()->pDedicatedVoiceChannelRight->Buffer()[Skip];
334          } else {          } else {
# Line 538  namespace LinuxSampler { Line 547  namespace LinuxSampler {
547          }          }
548    
549          if (bVoiceRequiresDedicatedRouting) {          if (bVoiceRequiresDedicatedRouting) {
550                if (bEq) {
551                    GetEngine()->pEq->RenderAudio(Samples);
552                    GetEngine()->pEq->GetOutChannelLeft()->CopyTo(GetEngine()->pDedicatedVoiceChannelLeft, Samples);
553                    GetEngine()->pEq->GetOutChannelRight()->CopyTo(GetEngine()->pDedicatedVoiceChannelRight, Samples);
554                }
555              optional<float> effectSendLevels[2] = {              optional<float> effectSendLevels[2] = {
556                  pMidiKeyInfo->ReverbSend,                  pMidiKeyInfo->ReverbSend,
557                  pMidiKeyInfo->ChorusSend                  pMidiKeyInfo->ChorusSend
558              };              };
559              GetEngine()->RouteDedicatedVoiceChannels(pEngineChannel, effectSendLevels, Samples);              GetEngine()->RouteDedicatedVoiceChannels(pEngineChannel, effectSendLevels, Samples);
560            } else if (bEq) {
561                GetEngine()->pEq->RenderAudio(Samples);
562                GetEngine()->pEq->GetOutChannelLeft()->CopyTo(pChannel->pChannelLeft, Samples);
563                GetEngine()->pEq->GetOutChannelRight()->CopyTo(pChannel->pChannelRight, Samples);
564          }          }
565      }      }
566    

Legend:
Removed from v.2219  
changed lines
  Added in v.2296

  ViewVC Help
Powered by ViewVC