Mercurial > hg > vampy-host
comparison test/test_process.py @ 116:3489986a044c
Fixes for OS/X build
author | Chris Cannam |
---|---|
date | Wed, 17 Jun 2015 13:27:57 +0100 |
parents | 9343eee50605 |
children | b56c1052d111 |
comparison
equal
deleted
inserted
replaced
115:899095c8760f | 116:3489986a044c |
---|---|
198 for i in range(len(results)): | 198 for i in range(len(results)): |
199 # The timestamp should be the frame number of the frame just beyond | 199 # The timestamp should be the frame number of the frame just beyond |
200 # half-way through the input buffer | 200 # half-way through the input buffer |
201 expected = i * (blocksize/2) + blocksize/2 | 201 expected = i * (blocksize/2) + blocksize/2 |
202 actual = results[i]["values"][0] | 202 actual = results[i]["values"][0] |
203 if actual == 2047 and expected == 2048: | |
204 print("This test fails because of a bug in the Vamp plugin SDK. Please update to SDK version 2.6.") | |
203 assert actual == expected | 205 assert actual == expected |
204 | 206 |
205 def test_process_multi_freq_timestamps(): | 207 def test_process_multi_freq_timestamps(): |
206 buf = input_data(blocksize * 10) | 208 buf = input_data(blocksize * 10) |
207 results = list(vamp.process_multiple_outputs(buf, rate, plugin_key_freq, [ "input-timestamp" ], {})) | 209 results = list(vamp.process_multiple_outputs(buf, rate, plugin_key_freq, [ "input-timestamp" ], {})) |
209 for i in range(len(results)): | 211 for i in range(len(results)): |
210 # The timestamp should be the frame number of the frame just beyond | 212 # The timestamp should be the frame number of the frame just beyond |
211 # half-way through the input buffer | 213 # half-way through the input buffer |
212 expected = i * (blocksize/2) + blocksize/2 | 214 expected = i * (blocksize/2) + blocksize/2 |
213 actual = results[i]["input-timestamp"]["values"][0] | 215 actual = results[i]["input-timestamp"]["values"][0] |
216 if actual == 2047 and expected == 2048: | |
217 print("This test fails because of a bug in the Vamp plugin SDK. Please update to SDK version 2.6.") | |
214 assert actual == expected | 218 assert actual == expected |
215 | 219 |
216 def test_process_multiple_outputs(): | 220 def test_process_multiple_outputs(): |
217 buf = input_data(blocksize * 10) | 221 buf = input_data(blocksize * 10) |
218 results = list(vamp.process_multiple_outputs(buf, rate, plugin_key, [ "input-summary", "input-timestamp" ], {})) | 222 results = list(vamp.process_multiple_outputs(buf, rate, plugin_key, [ "input-summary", "input-timestamp" ], {})) |