python-soundfile
python-soundfile copied to clipboard
Check if write() works by comparing the written file with an existing file
trafficstars
... instead of reading it with read().
See discussion in #55.
filecmp.cmp() should probably be used for that.
And we have to add a 'peak' chunk to the file stereo.wav first.
A more general solution would be a RIFF-aware comparison function, which only compares the contents of the fmt chunk and the data chunk. This should be pretty simple to do, and has less of a dependence on the implementation details of libsndfile.