#include "xaudioxmaloopregion.h"

XAudioXmaLoopRegion::XAudioXmaLoopRegion()
    : XAsset()
    , mLoopStart(0)
    , mLoopEnd(0)
    , mLoopSubframeEnd(0)
    , mLoopSubframeSkip(0)
{
    SetName("Audio XMA Loop Region");
}

XAudioXmaLoopRegion::~XAudioXmaLoopRegion()
{

}

void XAudioXmaLoopRegion::ParseData(XDataStream *aStream)
{
    mLoopStart = aStream->ParseUInt32(QString("%1 loop start").arg(GetName()));
    mLoopEnd = aStream->ParseUInt32(QString("%1 loop end").arg(GetName()));
    mLoopSubframeEnd = aStream->ParseUInt8(QString("%1 loop sub frame end").arg(GetName()));
    mLoopSubframeSkip = aStream->ParseUInt8(QString("%1 loop sub grame skip").arg(GetName()));
}

void XAudioXmaLoopRegion::Clear()
{
    mLoopStart = 0;
    mLoopEnd = 0;
    mLoopSubframeEnd = 0;
    mLoopSubframeSkip = 0;
}
