Mercurial > hg > python-tutorial-skeleton
view test_audiofile.py @ 5:ea2387fd1b90 tip
Add CC0 disclaimers
author | Chris Cannam |
---|---|
date | Thu, 04 Oct 2012 22:12:02 +0100 |
parents | a8cde97eae7b |
children |
line wrap: on
line source
# To the extent possible under law, Chris Cannam and QMUL have waived # all copyright and related or neighboring rights to this file # (http://creativecommons.org/about/cc0) import audiofile as af def test_read_all_mono_from_file(): (samples, samplerate) = af.read_all_mono_samples_from_file('testfiles/4sample-stereo-ny.wav') assert samplerate == 44100 assert len(samples) == 4 assert samples[0] > 0.999 and samples[0] < 1 assert samples[1] == -1 assert samples[2] > 0.999 and samples[2] < 1 assert samples[3] == -1