Changeset 07bf04e6 for interfaces


Ignore:
Timestamp:
Oct 19, 2009, 3:27:20 PM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
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
Message:

python/: update to new filter, test_filter.py py-filter.c

Location:
interfaces/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • interfaces/python/py-filter.c

    rec1ce52 r07bf04e6  
    148148
    149149static 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,
    151151      "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,
    153153      "set filter coefficients to A-weighting"},
    154154  {NULL}
  • interfaces/python/test_filter.py

    rec1ce52 r07bf04e6  
    1818 
    1919  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 )
    3232
    3333  def test_c_weighting(self):
Note: See TracChangeset for help on using the changeset viewer.