Fix: Parse audio source format data
This commit is contained in:
parent
d18cfb6968
commit
d9aa25c4af
@ -1,8 +1,12 @@
|
||||
#include "xaudiosourceformat.h"
|
||||
|
||||
XAudioSourceFormat::XAudioSourceFormat()
|
||||
: XAsset()
|
||||
, mSampleType(0)
|
||||
, mStreamInfo()
|
||||
, mAudioFormatInfo()
|
||||
{
|
||||
|
||||
SetName("Audio Source Format");
|
||||
}
|
||||
|
||||
XAudioSourceFormat::~XAudioSourceFormat()
|
||||
@ -10,12 +14,23 @@ XAudioSourceFormat::~XAudioSourceFormat()
|
||||
|
||||
}
|
||||
|
||||
void XAudioSourceFormat::ParseData(QDataStream *aStream)
|
||||
void XAudioSourceFormat::ParseData(XDataStream *aStream)
|
||||
{
|
||||
mSampleType = aStream->ParseUInt8(QString("%1 sample type").arg(GetName()));
|
||||
|
||||
aStream->skipRawData(3);
|
||||
|
||||
mStreamInfo.ParsePtr(aStream, false);
|
||||
mAudioFormatInfo.ParsePtr(aStream, false);
|
||||
|
||||
mStreamInfo.ParseData(aStream);
|
||||
mAudioFormatInfo.ParseData(aStream);
|
||||
}
|
||||
|
||||
void XAudioSourceFormat::Clear()
|
||||
{
|
||||
|
||||
mSampleType = 0;
|
||||
mStreamInfo.Clear();
|
||||
mAudioFormatInfo.Clear();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user