2025-08-14 17:30:25 -04:00
|
|
|
#include "xsoundfile.h"
|
|
|
|
|
|
|
|
|
|
XSoundFile::XSoundFile()
|
2025-09-07 12:36:08 -04:00
|
|
|
: XAsset()
|
|
|
|
|
, mType(0)
|
|
|
|
|
, mExists(0)
|
|
|
|
|
, mRef()
|
2025-08-14 17:30:25 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
XSoundFile::~XSoundFile()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-07 12:36:08 -04:00
|
|
|
quint8 XSoundFile::GetSoundType() const
|
|
|
|
|
{
|
|
|
|
|
return mType;
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-14 17:30:25 -04:00
|
|
|
void XSoundFile::ParseData(QDataStream *aStream)
|
|
|
|
|
{
|
2025-09-07 12:36:08 -04:00
|
|
|
if (GetPtr() == -1)
|
|
|
|
|
{
|
|
|
|
|
*aStream
|
|
|
|
|
>> mType
|
|
|
|
|
>> mExists;
|
2025-08-14 17:30:25 -04:00
|
|
|
|
2025-09-07 12:36:08 -04:00
|
|
|
aStream->skipRawData(2);
|
|
|
|
|
|
|
|
|
|
mRef.ParseData(aStream);
|
|
|
|
|
}
|
2025-08-14 17:30:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XSoundFile::Clear()
|
|
|
|
|
{
|
2025-09-07 12:36:08 -04:00
|
|
|
mType = 0;
|
|
|
|
|
mExists = 0;
|
|
|
|
|
mRef.Clear();
|
2025-08-14 17:30:25 -04:00
|
|
|
}
|