Serial-ATA / lofty-rs

Audio metadata library
Apache License 2.0
184 stars 34 forks source link

WavPack: Stop overwriting custom sample rates #244

Closed Serial-ATA closed 1 year ago

Serial-ATA commented 1 year ago

When a custom sample rate (or multiplier) was encountered, it would accidentally be overwritten with 0, causing incorrect duration and bitrate values.

This was due to us reading the metadata sub blocks first (when necessary) and then immediately overwriting the sample rate with the value from the block header (which is 0 in the presence of a custom sample rate).