26 |
#include "AbstractEngineChannel.h" |
#include "AbstractEngineChannel.h" |
27 |
#include "EngineFactory.h" |
#include "EngineFactory.h" |
28 |
#include "../common/global_private.h" |
#include "../common/global_private.h" |
29 |
|
#include "../effects/EffectFactory.h" |
30 |
|
|
31 |
namespace LinuxSampler { |
namespace LinuxSampler { |
32 |
|
|
81 |
FrameTime = 0; |
FrameTime = 0; |
82 |
RandomSeed = 0; |
RandomSeed = 0; |
83 |
pDedicatedVoiceChannelLeft = pDedicatedVoiceChannelRight = NULL; |
pDedicatedVoiceChannelLeft = pDedicatedVoiceChannelRight = NULL; |
84 |
|
pEq = NULL; |
85 |
} |
} |
86 |
|
|
87 |
AbstractEngine::~AbstractEngine() { |
AbstractEngine::~AbstractEngine() { |
92 |
if (pSysexBuffer) delete pSysexBuffer; |
if (pSysexBuffer) delete pSysexBuffer; |
93 |
if (pDedicatedVoiceChannelLeft) delete pDedicatedVoiceChannelLeft; |
if (pDedicatedVoiceChannelLeft) delete pDedicatedVoiceChannelLeft; |
94 |
if (pDedicatedVoiceChannelRight) delete pDedicatedVoiceChannelRight; |
if (pDedicatedVoiceChannelRight) delete pDedicatedVoiceChannelRight; |
95 |
|
if (pEq) delete pEq; |
96 |
Unregister(); |
Unregister(); |
97 |
} |
} |
98 |
|
|
308 |
return false; // error |
return false; // error |
309 |
} |
} |
310 |
AudioChannel* pDstChan = NULL; |
AudioChannel* pDstChan = NULL; |
311 |
if (pFxSend->DestinationMasterEffectChain() >= 0) { // fx send routed to an internal master effect |
if (pFxSend->DestinationEffectChain() >= 0) { // fx send routed to an internal send effect |
312 |
EffectChain* pEffectChain = |
EffectChain* pEffectChain = |
313 |
pAudioOutputDevice->MasterEffectChain( |
pAudioOutputDevice->SendEffectChainByID( |
314 |
pFxSend->DestinationMasterEffectChain() |
pFxSend->DestinationEffectChain() |
315 |
); |
); |
316 |
if (!pEffectChain) { |
if (!pEffectChain) { |
317 |
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())); |
318 |
return false; // error |
return false; // error |
319 |
} |
} |
320 |
Effect* pEffect = |
Effect* pEffect = |
321 |
pEffectChain->GetEffect( |
pEffectChain->GetEffect( |
322 |
pFxSend->DestinationMasterEffect() |
pFxSend->DestinationEffectChainPosition() |
323 |
); |
); |
324 |
if (!pEffect) { |
if (!pEffect) { |
325 |
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())); |
326 |
return false; // error |
return false; // error |
327 |
} |
} |
328 |
pDstChan = pEffect->InputChannel(iDstChan); |
pDstChan = pEffect->InputChannel(iDstChan); |