mirror of
https://github.com/arcctgx/ARver
synced 2025-12-16 23:07:22 +00:00
Even though the "skip silence" variant of CRC32 is unusual and not directly supported in zlib, one can calculate it using zlib if zero samples are removed from the input data. If input data modification is allowed, this operation can be done in place, avoiding the additional cost of copying a large memory area. The only restriction is that "skip silence" CRC32 must be calculated last, because the original input data is lost when zero samples are removed. Note: there is no data race here. remove_zero_samples() is only called after both AccurateRip and CRC32 calculations are done and don't access the audio data anymore. This sequencing is guaranteed by the fact that accuraterip() is itself blocking, and by using pthread_join() to block until the CRC32 thread has finished. Update the return type and the docstring of get_checksums() to include the additional checksum returned by the C extension. Print the "skip silence" CRC32 in arver output and in arver-ripinfo table. Add "skip silence" CRC32 checksums to tests and verify them. The results were also tested manually by comparing the "W/O NULL" CRC32s produced by CUETools with "CRCSS" values calculated by arver-ripinfo for 51 tracks from seven CDs. The process of removing zero samples is surprisingly costly, so adding the "skip silence" CRC32 calculation results in a performance penalty. However, taking into account the previous performance improvement, the end result is only slightly noticeable. It largely depends on the input format: for FLAC files where the majority of processing time is spent decoding FLAC to WAV, it's not really relevant. It is noticeable when verifying WAV files.
1,003 B
1,003 B
TODO list
Must have in v1.0.0
- read TOC from physical CD
- read TOC from DiscID
- calculate FreeDB CD indentifier
- calculate AccurateRip CD identifiers
- calculate AccurateRip checksums of ripped files (WAV and FLAC)
- fetch AccurateRip results from database
- parse AccurateRip binary data format
- compare database checksums with file checksums
- Audio CD support
- Enhanced CD support
- README.md (with acknowledgements)
- proper Python package (pip-installable, with wheels)
Further development
- show copy CRC of ripped files in results
- parser for cached AccurateRip response binary files
- full FLAC support (audio file properties + CRC calculation)
- Mixed Mode CD support
- warn if lengths of ripped tracks don't match CD TOC
- calculate copy CRC without zero samples ("skip silence" CRC)
- create log file with results
- offset detection
- write-up of all I learned about CDs and AccurateRip