#include "xaudioreverbsettings.h"

XAudioReverbSettings::XAudioReverbSettings()
    : XAsset()
    , mPresetOverridden(0)
    , mReverbSettings(new XReverbSettings())
{

}

void XAudioReverbSettings::Clear()
{
    mPresetOverridden = 0;
    mReverbSettings->Clear();
}

int XAudioReverbSettings::GetPresetOverridden() const
{
    return mPresetOverridden;
}

XReverbSettings* XAudioReverbSettings::GetReverbSettings() const
{
    return mReverbSettings;
}

void XAudioReverbSettings::ParseData(QDataStream *aStream)
{
    if (GetPtr())
    {
        *aStream
            >> mPresetOverridden;

        if (mReverbSettings != nullptr)
        {
            mReverbSettings->ParseData(aStream);
        }
    }
}

void XAudioReverbSettings::SetPresetOverridden(int aPresetOveridden)
{
    mPresetOverridden = aPresetOveridden;
}

void XAudioReverbSettings::SetReverbSettings(XReverbSettings* aReverbSettings)
{
    mReverbSettings = aReverbSettings;
}
