Changeset 2672d67 for tests/python/src/temporal
- Timestamp:
- Oct 8, 2009, 2:13:38 AM (15 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 5a93302
- Parents:
- f603b57
- Location:
- tests/python/src/temporal
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/python/src/temporal/a_weighting.py
rf603b57 r2672d67 3 3 samplerate = 44100 4 4 buf_size = 1024 5 channels = 25 channels = 1 6 6 7 class a dsgn_filter_unit(aubio_unit_template):7 class a_weighting_unit (aubio_unit_template): 8 8 9 9 def setUp(self): … … 47 47 del_fvec(vec) 48 48 49 def test_simple(self): 50 buf_size = 32 51 input = new_fvec (buf_size, 1) 52 output = new_fvec (buf_size, 1) 53 expected = array_from_text_file('src/temporal/a_weighting_test_simple.expected') 54 fvec_write_sample (input, 0.5, 0, 12) 55 for i in range(buf_size): 56 for c in range(channels): 57 self.assertEqual(expected[0][i], fvec_read_sample(input, c, i)) 58 f = new_aubio_filter_a_weighting (samplerate, channels) 59 aubio_filter_do_outplace (f, input, output) 60 del_aubio_filter (f) 61 for i in range(buf_size): 62 for c in range(channels): 63 self.assertCloseEnough(expected[1][i], fvec_read_sample(output, c, i)) 64 49 65 if __name__ == '__main__': 50 66 import unittest
Note: See TracChangeset
for help on using the changeset viewer.