fvec_min_removal (vec);
// since this function does not return, we could return None
- //return Py_None;
+ //Py_RETURN_NONE;
// however it is convenient to return the modified vector
return (PyObject *) PyAubio_CFvecToArray(vec);
// or even without converting it back to an array
"error when setting filter to C-weighting");
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *
"error when setting filter to A-weighting");
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *
"error when setting filter with biquad coefficients");
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMemberDef Py_filter_members[] = {
"error when setting filter to A-weighting");
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *
"error when setting filter to A-weighting");
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *
"error when setting filter coefficients");
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *
else:
returnval += " return (PyObject *)" + aubiovectopyobj[p['type']] + " (" + p['name'] + ")"
else:
- returnval = " return Py_None;";
+ returnval += " Py_RETURN_NONE"
# end of output strings
return outputvecs, outputcreate, returnval
"error running %(funcname)s");
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
""" % {'funcname': method_name, 'objname': name,
'out_type': out_type, 'setter_args': setter_args, 'parse_args': parse_args }
def setUp(self):
if not len(list_of_sounds): self.skipTest('add some sound files in \'python/tests/sounds\'')
+ def test_many_sinks(self):
+ for i in range(100):
+ g = sink('/tmp/f.wav', 0)
+ write = 256
+ for n in range(200):
+ vec = fvec(write)
+ g(vec, write)
+ del g
+
def test_read(self):
for path in list_of_sounds:
for samplerate, hop_size in zip([0, 44100, 8000, 32000], [512, 1024, 64, 256]):
print total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")",
print "from", f.uri,
print "to", g.uri
+ #del f, g
if __name__ == '__main__':
- from unittest import main
- main()
-
+ from unittest import main
+ main()