accuraterip-checksum: convert to python C extension

* calculate v1 and v2 checksums at once
* let libsndfile handle both WAV and FLAC

Signed-off-by: Andreas Oberritter <obi@saftware.de>
This commit is contained in:
Andreas Oberritter
2018-05-10 03:14:03 +02:00
parent 635113be9a
commit ab95715efc
9 changed files with 98 additions and 290 deletions

View File

@@ -190,12 +190,7 @@ CD in the AccurateRip database."""
track, offset)
runner.run(t)
v1 = arc.accuraterip_checksum(
path, track, len(table.tracks), wave=True, v2=False
)
v2 = arc.accuraterip_checksum(
path, track, len(table.tracks), wave=True, v2=True
)
v1, v2 = arc.accuraterip_checksum(path, track, len(table.tracks))
os.unlink(path)
return "%08x" % v1, "%08x" % v2