mirror of
https://github.com/taglib/taglib.git
synced 2025-11-12 20:52:52 -05:00
ByteVector::toUInt() takes offset and length
This commit is contained in:
@ -133,16 +133,16 @@ void TrueAudio::Properties::read()
|
||||
// Skip the audio format
|
||||
pos += 2;
|
||||
|
||||
d->channels = d->data.mid(pos, 2).toShort(false);
|
||||
d->channels = d->data.toShort(pos, false);
|
||||
pos += 2;
|
||||
|
||||
d->bitsPerSample = d->data.mid(pos, 2).toShort(false);
|
||||
d->bitsPerSample = d->data.toShort(pos, false);
|
||||
pos += 2;
|
||||
|
||||
d->sampleRate = d->data.mid(pos, 4).toUInt(false);
|
||||
d->sampleRate = d->data.toUInt(pos, false);
|
||||
pos += 4;
|
||||
|
||||
d->sampleFrames = d->data.mid(pos, 4).toUInt(false);
|
||||
d->sampleFrames = d->data.toUInt(pos, false);
|
||||
d->length = d->sampleRate > 0 ? d->sampleFrames / d->sampleRate : 0;
|
||||
|
||||
d->bitrate = d->length > 0 ? ((d->streamLength * 8L) / d->length) / 1000 : 0;
|
||||
|
||||
Reference in New Issue
Block a user