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:
parent
9c6c55fe75
commit
f88eeec7ee
@ -6,7 +6,7 @@ XAudioChannelMapEntry::XAudioChannelMapEntry()
|
|||||||
, mOutputChannel(0)
|
, mOutputChannel(0)
|
||||||
, mVolume(0.0)
|
, mVolume(0.0)
|
||||||
{
|
{
|
||||||
|
SetName("Audio Channel Map Entry");
|
||||||
}
|
}
|
||||||
|
|
||||||
XAudioChannelMapEntry::~XAudioChannelMapEntry()
|
XAudioChannelMapEntry::~XAudioChannelMapEntry()
|
||||||
@ -44,16 +44,15 @@ void XAudioChannelMapEntry::SetVolume(float aVolume)
|
|||||||
mVolume = aVolume;
|
mVolume = aVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XAudioChannelMapEntry::ParseData(QDataStream *aStream)
|
void XAudioChannelMapEntry::ParseData(XDataStream *aStream)
|
||||||
{
|
{
|
||||||
*aStream
|
mInputChannel = aStream->ParseUInt8(QString("%1 input channel").arg(GetName()));
|
||||||
>> mInputChannel
|
mOutputChannel = aStream->ParseUInt8(QString("%1 output channel").arg(GetName()));
|
||||||
>> mOutputChannel;
|
|
||||||
|
|
||||||
// Skip padding bytes in struct
|
// Skip padding bytes in struct
|
||||||
aStream->skipRawData(2);
|
aStream->skipRawData(2);
|
||||||
|
|
||||||
*aStream >> mVolume;
|
mVolume = aStream->ParseSingle(QString("%1 volume").arg(GetName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void XAudioChannelMapEntry::Clear()
|
void XAudioChannelMapEntry::Clear()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user