// This file is generated by kconfig_compiler_kf6 from easyeffects_db_speex.kcfg.
// All changes you do to this file will be lost.

#include "easyeffects_db_speex.h"

DbSpeex::DbSpeex( const QString & masterGroup, const QString & instanceIndex )
  : KConfigBaseEE( QStringLiteral( "easyeffects/db/speexrc" ) )
  , mParammasterGroup(masterGroup)
  , mParaminstanceIndex(instanceIndex)
{
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&DbSpeex::itemChanged);

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgSpeexinstanceIndex = cgmasterGroup.group(QStringLiteral( "Speex#%1" ).arg( mParaminstanceIndex ));
  KConfigCompilerSignallingItem  *itemBypass;
  KConfigBaseEE::ItemBool  *innerItemBypass;
  innerItemBypass = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "bypass" ), mBypass, false );
  itemBypass = new KConfigCompilerSignallingItem(innerItemBypass, this, notifyFunction, signalBypassChanged);
  itemBypass->setWriteFlags(KConfigBase::Notify);
  itemBypass->setGroup(cgSpeexinstanceIndex);
  addItem( itemBypass, QStringLiteral( "bypass" ) );
  KConfigCompilerSignallingItem  *itemInputGain;
  KConfigBaseEE::ItemDouble  *innerItemInputGain;
  innerItemInputGain = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "inputGain" ), mInputGain, 0 );
  itemInputGain = new KConfigCompilerSignallingItem(innerItemInputGain, this, notifyFunction, signalInputGainChanged);
  innerItemInputGain->setMinValue(-36);
  innerItemInputGain->setMaxValue(36);
  itemInputGain->setWriteFlags(KConfigBase::Notify);
  itemInputGain->setGroup(cgSpeexinstanceIndex);
  addItem( itemInputGain, QStringLiteral( "inputGain" ) );
  KConfigCompilerSignallingItem  *itemOutputGain;
  KConfigBaseEE::ItemDouble  *innerItemOutputGain;
  innerItemOutputGain = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "outputGain" ), mOutputGain, 0 );
  itemOutputGain = new KConfigCompilerSignallingItem(innerItemOutputGain, this, notifyFunction, signalOutputGainChanged);
  innerItemOutputGain->setMinValue(-36);
  innerItemOutputGain->setMaxValue(36);
  itemOutputGain->setWriteFlags(KConfigBase::Notify);
  itemOutputGain->setGroup(cgSpeexinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  KConfigCompilerSignallingItem  *itemEnableDenoise;
  KConfigBaseEE::ItemBool  *innerItemEnableDenoise;
  innerItemEnableDenoise = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "enableDenoise" ), mEnableDenoise, true );
  itemEnableDenoise = new KConfigCompilerSignallingItem(innerItemEnableDenoise, this, notifyFunction, signalEnableDenoiseChanged);
  itemEnableDenoise->setWriteFlags(KConfigBase::Notify);
  itemEnableDenoise->setGroup(cgSpeexinstanceIndex);
  addItem( itemEnableDenoise, QStringLiteral( "enableDenoise" ) );
  KConfigCompilerSignallingItem  *itemNoiseSuppression;
  KConfigBaseEE::ItemInt  *innerItemNoiseSuppression;
  innerItemNoiseSuppression = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "noiseSuppression" ), mNoiseSuppression, -70 );
  itemNoiseSuppression = new KConfigCompilerSignallingItem(innerItemNoiseSuppression, this, notifyFunction, signalNoiseSuppressionChanged);
  innerItemNoiseSuppression->setMinValue(-100);
  innerItemNoiseSuppression->setMaxValue(-1);
  itemNoiseSuppression->setWriteFlags(KConfigBase::Notify);
  itemNoiseSuppression->setGroup(cgSpeexinstanceIndex);
  addItem( itemNoiseSuppression, QStringLiteral( "noiseSuppression" ) );
  KConfigCompilerSignallingItem  *itemEnableAgc;
  KConfigBaseEE::ItemBool  *innerItemEnableAgc;
  innerItemEnableAgc = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "enableAgc" ), mEnableAgc, false );
  itemEnableAgc = new KConfigCompilerSignallingItem(innerItemEnableAgc, this, notifyFunction, signalEnableAgcChanged);
  itemEnableAgc->setWriteFlags(KConfigBase::Notify);
  itemEnableAgc->setGroup(cgSpeexinstanceIndex);
  addItem( itemEnableAgc, QStringLiteral( "enableAgc" ) );
  KConfigCompilerSignallingItem  *itemEnableVad;
  KConfigBaseEE::ItemBool  *innerItemEnableVad;
  innerItemEnableVad = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "enableVad" ), mEnableVad, false );
  itemEnableVad = new KConfigCompilerSignallingItem(innerItemEnableVad, this, notifyFunction, signalEnableVadChanged);
  itemEnableVad->setWriteFlags(KConfigBase::Notify);
  itemEnableVad->setGroup(cgSpeexinstanceIndex);
  addItem( itemEnableVad, QStringLiteral( "enableVad" ) );
  KConfigCompilerSignallingItem  *itemVadProbabilityStart;
  KConfigBaseEE::ItemInt  *innerItemVadProbabilityStart;
  innerItemVadProbabilityStart = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "vadProbabilityStart" ), mVadProbabilityStart, 95 );
  itemVadProbabilityStart = new KConfigCompilerSignallingItem(innerItemVadProbabilityStart, this, notifyFunction, signalVadProbabilityStartChanged);
  innerItemVadProbabilityStart->setMinValue(0);
  innerItemVadProbabilityStart->setMaxValue(100);
  itemVadProbabilityStart->setWriteFlags(KConfigBase::Notify);
  itemVadProbabilityStart->setGroup(cgSpeexinstanceIndex);
  addItem( itemVadProbabilityStart, QStringLiteral( "vadProbabilityStart" ) );
  KConfigCompilerSignallingItem  *itemVadProbabilityContinue;
  KConfigBaseEE::ItemInt  *innerItemVadProbabilityContinue;
  innerItemVadProbabilityContinue = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "vadProbabilityContinue" ), mVadProbabilityContinue, 90 );
  itemVadProbabilityContinue = new KConfigCompilerSignallingItem(innerItemVadProbabilityContinue, this, notifyFunction, signalVadProbabilityContinueChanged);
  innerItemVadProbabilityContinue->setMinValue(0);
  innerItemVadProbabilityContinue->setMaxValue(100);
  itemVadProbabilityContinue->setWriteFlags(KConfigBase::Notify);
  itemVadProbabilityContinue->setGroup(cgSpeexinstanceIndex);
  addItem( itemVadProbabilityContinue, QStringLiteral( "vadProbabilityContinue" ) );
  KConfigCompilerSignallingItem  *itemEnableDereverb;
  KConfigBaseEE::ItemBool  *innerItemEnableDereverb;
  innerItemEnableDereverb = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "enableDereverb" ), mEnableDereverb, false );
  itemEnableDereverb = new KConfigCompilerSignallingItem(innerItemEnableDereverb, this, notifyFunction, signalEnableDereverbChanged);
  itemEnableDereverb->setWriteFlags(KConfigBase::Notify);
  itemEnableDereverb->setGroup(cgSpeexinstanceIndex);
  addItem( itemEnableDereverb, QStringLiteral( "enableDereverb" ) );
}

bool DbSpeex::defaultBypassValue_helper() const
{

  return false;
}

double DbSpeex::defaultInputGainValue_helper() const
{

  return 0;
}

double DbSpeex::defaultOutputGainValue_helper() const
{

  return 0;
}

bool DbSpeex::defaultEnableDenoiseValue_helper() const
{

  return true;
}

int DbSpeex::defaultNoiseSuppressionValue_helper() const
{

  return -70;
}

bool DbSpeex::defaultEnableAgcValue_helper() const
{

  return false;
}

bool DbSpeex::defaultEnableVadValue_helper() const
{

  return false;
}

int DbSpeex::defaultVadProbabilityStartValue_helper() const
{

  return 95;
}

int DbSpeex::defaultVadProbabilityContinueValue_helper() const
{

  return 90;
}

bool DbSpeex::defaultEnableDereverbValue_helper() const
{

  return false;
}

DbSpeex::~DbSpeex()
{
}


void DbSpeex::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalEnableDenoiseChanged:
    Q_EMIT enableDenoiseChanged();
    break;
  case signalNoiseSuppressionChanged:
    Q_EMIT noiseSuppressionChanged();
    break;
  case signalEnableAgcChanged:
    Q_EMIT enableAgcChanged();
    break;
  case signalEnableVadChanged:
    Q_EMIT enableVadChanged();
    break;
  case signalVadProbabilityStartChanged:
    Q_EMIT vadProbabilityStartChanged();
    break;
  case signalVadProbabilityContinueChanged:
    Q_EMIT vadProbabilityContinueChanged();
    break;
  case signalEnableDereverbChanged:
    Q_EMIT enableDereverbChanged();
    break;
  }
}
