With thanks to skamp (http://www.hydrogenaudio.org/forums/index.php?showuser=13875) and pablogm123 (http://www.hydrogenaudio.org/forums/index.php?showuser=97152) for telling me how the computation works.
https://github.com/leo-bogert/eac-crc (https://github.com/leo-bogert/eac-crc)
Version 1.1 availablel now. Bugfix release, please upgrade.
Changelog:
- Bugfix: Do not print a crc of "00000000" when there is a problem with the input file (it doesn't exist, is damaged, etc.). Instead, print an error message and exit with non-zero exit code.
- Check for number of parameters and print syntax if it is not equal to 1.
Version 1.2 has been available for some time. Bugfix release, please upgrade.
Changelog:
- Bugfix: Don't output CRC if shncat/rhash had non-success exit status
- Add "--version" parameter
FYI, you could use the more widespread SoX instead of shncat: "sox file.wav -t raw -". I mean, people are more likely to have SoX installed, than shntool.
It has the added benefit of supporting non-CDDA WAV files (though I guess you don't care about that, in this particular instance). Just a thought.
FYI, you could use the more widespread SoX instead of shncat: "sox file.wav -t raw -". I mean, people are more likely to have SoX installed, than shntool.
It has the added benefit of supporting non-CDDA WAV files (though I guess you don't care about that, in this particular instance). Just a thought.
eac-crc is a dependancy of my tool perfect-flac-encode (http://www.hydrogenaudio.org/forums/index.php?showtopic=97643). During the development of PFE, eac-crc in this particular version has been tested with over 220 CD images and no issues have appeared. This encourages me to not change it anymore. Also, perfect-flac-encode needs shntool for splitting WAV images according to Cuesheets, so if eac-crc was changed to use SoX, another dependancy of PFE would be introduced. Further, as of Ubuntu 12.10, SoX is not installed by default, so something has to be installed anyway on my target OS. But thanks for your suggestion!
Also, perfect-flac-encode needs shntool for splitting WAV images according to Cuesheets, so if eac-crc was changed to use SoX, another dependancy of PFE would be introduced.
I see, that makes sense. Never mind