XPlor/libs/xassets/xaudiosourceformat.cpp

37 lines
699 B
C++
Raw Normal View History

2025-08-14 17:30:25 -04:00
#include "xaudiosourceformat.h"
XAudioSourceFormat::XAudioSourceFormat()
2025-09-10 21:56:44 -04:00
: XAsset()
, mSampleType(0)
, mStreamInfo()
, mAudioFormatInfo()
2025-08-14 17:30:25 -04:00
{
2025-09-10 21:56:44 -04:00
SetName("Audio Source Format");
2025-08-14 17:30:25 -04:00
}
XAudioSourceFormat::~XAudioSourceFormat()
{
}
2025-09-10 21:56:44 -04:00
void XAudioSourceFormat::ParseData(XDataStream *aStream)
2025-08-14 17:30:25 -04:00
{
2025-09-10 21:56:44 -04:00
mSampleType = aStream->ParseUInt8(QString("%1 sample type").arg(GetName()));
aStream->skipRawData(3);
mStreamInfo.ParsePtr(aStream, false);
mAudioFormatInfo.ParsePtr(aStream, false);
2025-08-14 17:30:25 -04:00
2025-09-10 21:56:44 -04:00
mStreamInfo.ParseData(aStream);
mAudioFormatInfo.ParseData(aStream);
2025-08-14 17:30:25 -04:00
}
void XAudioSourceFormat::Clear()
{
2025-09-10 21:56:44 -04:00
mSampleType = 0;
mStreamInfo.Clear();
mAudioFormatInfo.Clear();
2025-08-14 17:30:25 -04:00
}