Mercurial > hg > vampy-host
changeset 147:8b08cbbdfe77
Python 3: make error message note that initialise args must be ints; fix erroneous float arg
author | Chris Cannam |
---|---|
date | Tue, 08 Nov 2016 11:41:09 +0000 |
parents | f87e711308e4 |
children | af5961718456 |
files | native/PyPluginObject.cpp test/test_process.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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; }
--- 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