comparison test_audiofile.py @ 0:a8cde97eae7b

Initialise with test files and simple audio-file reading code
author Chris Cannam
date Wed, 03 Oct 2012 11:54:18 +0100
parents
children ea2387fd1b90
comparison
equal deleted inserted replaced
-1:000000000000 0:a8cde97eae7b
1
2 import audiofile as af
3
4 def test_read_all_mono_from_file():
5 (samples, samplerate) = af.read_all_mono_samples_from_file('testfiles/4sample-stereo-ny.wav')
6 assert samplerate == 44100
7 assert len(samples) == 4
8 assert samples[0] > 0.999 and samples[0] < 1
9 assert samples[1] == -1
10 assert samples[2] > 0.999 and samples[2] < 1
11 assert samples[3] == -1
12