#include "xreverbsettings.h"

XReverbSettings::XReverbSettings()
    : XAsset()
    , mReflectionsDelay(0)
    , mReverbDelay(0)
    , mRearDelay(0)
    , mPositionLeft(0)
    , mPositionRight(0)
    , mPositionMatrixLeft(0)
    , mPositionMatrixRight(0)
    , mEarlyDiffusion(0)
    , mLateDiffusion(0)
    , mLowEQGain(0)
    , mLowEQCutoff(0)
    , mHighEQGain(0)
    , mHighEQCutoff(0)
    , mRoomFilterFreq(0.0)
    , mRoomFilterMain(0.0)
    , mRoomFilterHF(0.0)
    , mReflectionsGain(0.0)
    , mReverbGain(0.0)
    , mDecayTime(0.0)
    , mDensity(0.0)
    , mRoomSize(0.0)
{
    SetName("Reverb Settings");
}

quint32 XReverbSettings::GetReflectionsDelay() const
{
    return mReflectionsDelay;
}

quint8 XReverbSettings::GetReverbDelay() const
{
    return mReverbDelay;
}

quint8 XReverbSettings::GetRearDelay() const
{
    return mRearDelay;
}

quint8 XReverbSettings::GetPositionLeft() const
{
    return mPositionLeft;
}

quint8 XReverbSettings::GetPositionRight() const
{
    return mPositionRight;
}

quint8 XReverbSettings::GetPositionMatrixLeft() const
{
    return mPositionMatrixLeft;
}

quint8 XReverbSettings::GetPositionMatrixRight() const
{
    return mPositionMatrixRight;
}

quint8 XReverbSettings::GetEarlyDiffusion() const
{
    return mEarlyDiffusion;
}

quint8 XReverbSettings::GetLateDiffusion() const
{
    return mLateDiffusion;
}

quint8 XReverbSettings::GetLowEQGain() const
{
    return mLowEQGain;
}

quint8 XReverbSettings::GetLowEQCutoff() const
{
    return mLowEQCutoff;
}

quint8 XReverbSettings::GetHighEQGain() const
{
    return mHighEQGain;
}

quint8 XReverbSettings::GetHighEQCutoff() const
{
    return mHighEQCutoff;
}

float XReverbSettings::GetRoomFilterFreq() const
{
    return mRoomFilterFreq;
}

float XReverbSettings::GetRoomFilterMain() const
{
    return mRoomFilterMain;
}

float XReverbSettings::GetRoomFilterHF() const
{
    return mRoomFilterHF;
}

float XReverbSettings::GetReflectionsGain() const
{
    return mReflectionsGain;
}

float XReverbSettings::GetReverbGain() const
{
    return mReverbGain;
}

float XReverbSettings::GetDecayTime() const
{
    return mDecayTime;
}

float XReverbSettings::GetDensity() const
{
    return mDensity;
}

float XReverbSettings::GetRoomSize() const
{
    return mRoomSize;
}

void XReverbSettings::Clear()
{
    mReflectionsDelay = 0;
    mReverbDelay = 0;
    mRearDelay = 0;
    mPositionLeft = 0;
    mPositionRight = 0;
    mPositionMatrixLeft = 0;
    mPositionMatrixRight = 0;
    mEarlyDiffusion = 0;
    mLateDiffusion = 0;
    mLowEQGain = 0;
    mLowEQCutoff = 0;
    mHighEQGain = 0;
    mHighEQCutoff = 0;
    mRoomFilterFreq = 0.0;
    mRoomFilterMain = 0.0;
    mRoomFilterHF = 0.0;
    mReflectionsGain = 0.0;
    mReverbGain = 0.0;
    mDecayTime = 0.0;
    mDensity = 0.0;
    mRoomSize = 0.0;

    XAsset::Clear();
}

void XReverbSettings::ParseData(XDataStream* aStream)
{
    *aStream
        >> mReflectionsDelay
        >> mReverbDelay
        >> mRearDelay
        >> mPositionLeft
        >> mPositionRight
        >> mPositionMatrixLeft
        >> mPositionMatrixRight
        >> mEarlyDiffusion
        >> mLateDiffusion
        >> mLowEQGain
        >> mLowEQCutoff
        >> mHighEQGain
        >> mHighEQCutoff
        >> mRoomFilterFreq
        >> mRoomFilterMain
        >> mRoomFilterHF
        >> mReflectionsGain
        >> mReverbGain
        >> mDecayTime
        >> mDensity
        >> mRoomSize;
}

void XReverbSettings::SetReflectionsDelay(quint32 aReflectionsDelay)
{
    mReflectionsDelay = aReflectionsDelay;
}

void XReverbSettings::SetReverbDelay(quint8 aReverbDelay)
{
    mReverbDelay = aReverbDelay;
}

void XReverbSettings::SetRearDelay(quint8 aRearDelay)
{
    mRearDelay = aRearDelay;
}

void XReverbSettings::SetPositionLeft(quint8 aPositionLeft)
{
    mPositionLeft = aPositionLeft;
}

void XReverbSettings::SetPositionRight(quint8 aPositionRight)
{
    mPositionRight = aPositionRight;
}

void XReverbSettings::SetPositionMatrixLeft(quint8 aPositionMatrixLeft)
{
    mPositionMatrixLeft = aPositionMatrixLeft;
}

void XReverbSettings::SetPositionMatrixRight(quint8 aPositionMatrixRight)
{
    mPositionMatrixRight = aPositionMatrixRight;
}

void XReverbSettings::SetEarlyDiffusion(quint8 aEarlyDiffusion)
{
    mEarlyDiffusion = aEarlyDiffusion;
}

void XReverbSettings::SetLateDiffusion(quint8 aLateDiffusion)
{
    mLateDiffusion = aLateDiffusion;
}

void XReverbSettings::SetLowEQGain(quint8 aLowEQGain)
{
    mLowEQGain = aLowEQGain;
}

void XReverbSettings::SetLowEQCutoff(quint8 aLowEQCutoff)
{
    mLowEQCutoff = aLowEQCutoff;
}

void XReverbSettings::SetHighEQGain(quint8 aHighEQGain)
{
    mHighEQGain = aHighEQGain;
}

void XReverbSettings::SetHighEQCutoff(quint8 aHighEQCutoff)
{
    mHighEQCutoff = aHighEQCutoff;
}

void XReverbSettings::SetRoomFilterFreq(float aRoomFilterFreq)
{
    mRoomFilterFreq = aRoomFilterFreq;
}

void XReverbSettings::SetRoomFilterMain(float aRoomFilterMain)
{
    mRoomFilterMain = aRoomFilterMain;
}

void XReverbSettings::SetRoomFilterHF(float aRoomFilterHF)
{
    mRoomFilterHF = aRoomFilterHF;
}

void XReverbSettings::SetReflectionsGain(float aReflectionsGain)
{
    mReflectionsGain = aReflectionsGain;
}

void XReverbSettings::SetReverbGain(float aReverbGain)
{
    mReverbGain = aReverbGain;
}

void XReverbSettings::SetDecayTime(float aDecayTime)
{
    mDecayTime = aDecayTime;
}

void XReverbSettings::SetDensity(float aDensity)
{
    mDensity = aDensity;
}

void XReverbSettings::SetRoomSize(float aRoomSize)
{
    mRoomSize = aRoomSize;
}

