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 { |
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 |
|
|