305 |
return false; // error |
return false; // error |
306 |
} |
} |
307 |
AudioChannel* pDstChan = NULL; |
AudioChannel* pDstChan = NULL; |
308 |
if (pFxSend->DestinationMasterEffectChain() >= 0) { // fx send routed to an internal master effect |
if (pFxSend->DestinationEffectChain() >= 0) { // fx send routed to an internal send effect |
309 |
EffectChain* pEffectChain = |
EffectChain* pEffectChain = |
310 |
pAudioOutputDevice->MasterEffectChain( |
pAudioOutputDevice->SendEffectChainByID( |
311 |
pFxSend->DestinationMasterEffectChain() |
pFxSend->DestinationEffectChain() |
312 |
); |
); |
313 |
if (!pEffectChain) { |
if (!pEffectChain) { |
314 |
dmsg(1,("Engine::RouteAudio() Error: invalid FX send (%s) destination effect chain %d", ((iChan) ? "R" : "L"), pFxSend->DestinationMasterEffectChain())); |
dmsg(1,("Engine::RouteAudio() Error: invalid FX send (%s) destination effect chain %d", ((iChan) ? "R" : "L"), pFxSend->DestinationEffectChain())); |
315 |
return false; // error |
return false; // error |
316 |
} |
} |
317 |
Effect* pEffect = |
Effect* pEffect = |
318 |
pEffectChain->GetEffect( |
pEffectChain->GetEffect( |
319 |
pFxSend->DestinationMasterEffect() |
pFxSend->DestinationEffectChainPosition() |
320 |
); |
); |
321 |
if (!pEffect) { |
if (!pEffect) { |
322 |
dmsg(1,("Engine::RouteAudio() Error: invalid FX send (%s) destination effect %d of effect chain %d", ((iChan) ? "R" : "L"), pFxSend->DestinationMasterEffect(), pFxSend->DestinationMasterEffectChain())); |
dmsg(1,("Engine::RouteAudio() Error: invalid FX send (%s) destination effect %d of effect chain %d", ((iChan) ? "R" : "L"), pFxSend->DestinationEffectChainPosition(), pFxSend->DestinationEffectChain())); |
323 |
return false; // error |
return false; // error |
324 |
} |
} |
325 |
pDstChan = pEffect->InputChannel(iDstChan); |
pDstChan = pEffect->InputChannel(iDstChan); |