From 01d2b95417387171af2fe208eeb2687a4b808b97 Mon Sep 17 00:00:00 2001 From: njohnson Date: Wed, 10 Sep 2025 21:56:49 -0400 Subject: [PATCH] Add XMA format parsing data fields --- libs/xassets/xaudioxmaformat.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libs/xassets/xaudioxmaformat.cpp b/libs/xassets/xaudioxmaformat.cpp index 2fcfdb0..a97a4bd 100644 --- a/libs/xassets/xaudioxmaformat.cpp +++ b/libs/xassets/xaudioxmaformat.cpp @@ -1,8 +1,12 @@ #include "xaudioxmaformat.h" XAudioXmaFormat::XAudioXmaFormat() + : XAsset() + , mSampleRate(0) + , mChannelCount(0) + , mDecodeBufferSize(0) { - + SetName("Audio XMA Format"); } XAudioXmaFormat::~XAudioXmaFormat() @@ -10,12 +14,16 @@ XAudioXmaFormat::~XAudioXmaFormat() } -void XAudioXmaFormat::ParseData(QDataStream *aStream) +void XAudioXmaFormat::ParseData(XDataStream *aStream) { - + mSampleRate = aStream->ParseUInt32(QString("%1 sample rate").arg(GetName())); + mChannelCount = aStream->ParseUInt8(QString("%1 channel count").arg(GetName())); + mDecodeBufferSize = aStream->ParseUInt8(QString("%1 decode buffer size").arg(GetName())); } void XAudioXmaFormat::Clear() { - + mSampleRate = 0; + mChannelCount = 0; + mDecodeBufferSize = 0; }