EngineEffect::EngineEffect(const EffectManifest& manifest, const QSet<QString>& registeredGroups, EffectInstantiatorPointer pInstantiator) : m_manifest(manifest), m_bEnabled(true), m_parameters(manifest.parameters().size()), m_buttonParameters(manifest.buttonParameters().size()) { const QList<EffectManifestParameter>& parameters = m_manifest.parameters(); for (int i = 0; i < parameters.size(); ++i) { const EffectManifestParameter& parameter = parameters.at(i); EngineEffectParameter* pParameter = new EngineEffectParameter(parameter); m_parameters[i] = pParameter; m_parametersById[parameter.id()] = pParameter; } const QList<EffectManifestParameter>& buttonParameters = m_manifest.buttonParameters(); for (int i = 0; i < buttonParameters.size(); ++i) { const EffectManifestParameter& parameter = buttonParameters.at(i); EngineEffectParameter* pParameter = new EngineEffectParameter(parameter); m_buttonParameters[i] = pParameter; m_buttonParametersById[parameter.id()] = pParameter; } // Creating the processor must come last. m_pProcessor = pInstantiator->instantiate(this, manifest); m_pProcessor->initialize(registeredGroups); }
EngineEffect::EngineEffect(const EffectManifest& manifest, const QSet<ChannelHandleAndGroup>& registeredChannels, EffectInstantiatorPointer pInstantiator) : m_manifest(manifest), m_enableState(EffectProcessor::ENABLING), m_parameters(manifest.parameters().size()) { const QList<EffectManifestParameter>& parameters = m_manifest.parameters(); for (int i = 0; i < parameters.size(); ++i) { const EffectManifestParameter& parameter = parameters.at(i); EngineEffectParameter* pParameter = new EngineEffectParameter(parameter); m_parameters[i] = pParameter; m_parametersById[parameter.id()] = pParameter; } // Creating the processor must come last. m_pProcessor = pInstantiator->instantiate(this, manifest); m_pProcessor->initialize(registeredChannels); m_effectRampsFromDry = manifest.effectRampsFromDry(); }