Changeset 07bf04e6 for interfaces
- Timestamp:
- Oct 19, 2009, 3:27:20 PM (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:
- 1c190d5
- Parents:
- ec1ce52
- Location:
- interfaces/python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
interfaces/python/py-filter.c
rec1ce52 r07bf04e6 148 148 149 149 static PyMethodDef Py_filter_methods[] = { 150 {"set_c_weighting", (PyCFunction) Py_filter_set_c_weighting, METH_ NOARGS,150 {"set_c_weighting", (PyCFunction) Py_filter_set_c_weighting, METH_VARARGS, 151 151 "set filter coefficients to C-weighting"}, 152 {"set_a_weighting", (PyCFunction) Py_filter_set_a_weighting, METH_ NOARGS,152 {"set_a_weighting", (PyCFunction) Py_filter_set_a_weighting, METH_VARARGS, 153 153 "set filter coefficients to A-weighting"}, 154 154 {NULL} -
interfaces/python/test_filter.py
rec1ce52 r07bf04e6 18 18 19 19 def test_cweighting_error(self): 20 f = digital_filter ( 44100,2, 1)21 self.assertRaises ( ValueError, f.set_c_weighting )22 f = digital_filter ( 44100,8, 1)23 self.assertRaises ( ValueError, f.set_c_weighting )24 f = digital_filter ( 4000,5, 1)25 self.assertRaises ( ValueError, f.set_c_weighting )26 f = digital_filter ( 193000,5, 1)27 self.assertRaises ( ValueError, f.set_c_weighting )28 f = digital_filter ( 193000,7, 1)29 self.assertRaises ( ValueError, f.set_a_weighting )30 f = digital_filter ( 192000,5, 1)31 self.assertRaises ( ValueError, f.set_a_weighting )20 f = digital_filter (2, 1) 21 self.assertRaises ( ValueError, f.set_c_weighting, 44100 ) 22 f = digital_filter (8, 1) 23 self.assertRaises ( ValueError, f.set_c_weighting, 44100 ) 24 f = digital_filter (5, 1) 25 self.assertRaises ( ValueError, f.set_c_weighting, 4000 ) 26 f = digital_filter (5, 1) 27 self.assertRaises ( ValueError, f.set_c_weighting, 193000 ) 28 f = digital_filter (7, 1) 29 self.assertRaises ( ValueError, f.set_a_weighting, 193000 ) 30 f = digital_filter (5, 1) 31 self.assertRaises ( ValueError, f.set_a_weighting, 192000 ) 32 32 33 33 def test_c_weighting(self):
Note: See TracChangeset
for help on using the changeset viewer.