Serial-ATA / lofty-rs

Audio metadata library
Apache License 2.0
187 stars 35 forks source link

WavPack: Add a TODO for unknown sample counts #366

Closed Serial-ATA closed 5 months ago

Serial-ATA commented 6 months ago

WavPack supports unknown sample counts:

typedef struct {
    // ...
    uint32_t total_samples;     // total samples for entire file, but this is
                                // only valid if block_index == 0 and a value of
                                // -1 indicates unknown length
    // ...
} WavpackHeader;

(https://web.archive.org/web/20150424062034/https://www.wavpack.com/file_format.txt)

This wasn't checked for before, so it would produce wild results for the duration. I don't plan on actually fixing this anytime soon, I'd just rather produce no results than wrong results.