# HG changeset patch # User Chris Cannam # Date 1478605269 0 # Node ID 8b08cbbdfe774e66046220f426abf691d19e588e # Parent f87e711308e4021e19f0f9a6e57bd5d9f349da52 Python 3: make error message note that initialise args must be ints; fix erroneous float arg diff -r f87e711308e4 -r 8b08cbbdfe77 native/PyPluginObject.cpp --- a/native/PyPluginObject.cpp Tue Nov 08 11:40:39 2016 +0000 +++ b/native/PyPluginObject.cpp Tue Nov 08 11:41:09 2016 +0000 @@ -354,7 +354,7 @@ &stepSize, &blockSize)) { PyErr_SetString(PyExc_TypeError, - "initialise() takes channel count, step size, and block size arguments"); + "initialise() takes channel count (int), step size (int), and block size (int) arguments"); return 0; } diff -r f87e711308e4 -r 8b08cbbdfe77 test/test_process.py --- a/test/test_process.py Tue Nov 08 11:40:39 2016 +0000 +++ b/test/test_process.py Tue Nov 08 11:41:09 2016 +0000 @@ -263,7 +263,7 @@ def test_process_stepsize_timestamps(): buf = input_data(blocksize * 10) - results = list(vamp.process_audio(buf, rate, plugin_key, "input-timestamp", {}, step_size = blocksize / 2)) + results = list(vamp.process_audio(buf, rate, plugin_key, "input-timestamp", {}, step_size = int(blocksize / 2))) assert len(results) == 20 for i in range(len(results)): # The timestamp should be the frame number of the first frame in the @@ -274,7 +274,7 @@ def test_process_stepsize_blocksize_timestamps(): buf = input_data(blocksize * 10) - results = list(vamp.process_audio(buf, rate, plugin_key, "input-timestamp", {}, block_size = blocksize * 2, step_size = blocksize / 2)) + results = list(vamp.process_audio(buf, rate, plugin_key, "input-timestamp", {}, block_size = blocksize * 2, step_size = int(blocksize / 2))) assert len(results) == 20 for i in range(len(results)): # The timestamp should be the frame number of the first frame in the