Fix: Parse Data Handling

This commit updates the `ParseData` method to correctly parse input channel, output channel and volume from the `XDataStream`.
This commit is contained in:
njohnson 2025-09-10 21:56:35 -04:00
parent 9c6c55fe75
commit f88eeec7ee

View File

@ -6,7 +6,7 @@ XAudioChannelMapEntry::XAudioChannelMapEntry()
, mOutputChannel(0)
, mVolume(0.0)
{
SetName("Audio Channel Map Entry");
}
XAudioChannelMapEntry::~XAudioChannelMapEntry()
@ -44,16 +44,15 @@ void XAudioChannelMapEntry::SetVolume(float aVolume)
mVolume = aVolume;
}
void XAudioChannelMapEntry::ParseData(QDataStream *aStream)
void XAudioChannelMapEntry::ParseData(XDataStream *aStream)
{
*aStream
>> mInputChannel
>> mOutputChannel;
mInputChannel = aStream->ParseUInt8(QString("%1 input channel").arg(GetName()));
mOutputChannel = aStream->ParseUInt8(QString("%1 output channel").arg(GetName()));
// Skip padding bytes in struct
aStream->skipRawData(2);
*aStream >> mVolume;
mVolume = aStream->ParseSingle(QString("%1 volume").arg(GetName()));
}
void XAudioChannelMapEntry::Clear()