From 0cbfa4a443ef40e57d20352a475afaa658673a09 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 3 Nov 2007 15:51:07 +0100 Subject: [PATCH] added simple phasevoc test --- tests/python/phasevoc.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/python/phasevoc.py diff --git a/tests/python/phasevoc.py b/tests/python/phasevoc.py new file mode 100644 index 00000000..cc71208d --- /dev/null +++ b/tests/python/phasevoc.py @@ -0,0 +1,30 @@ +import unittest + +from aubio.aubiowrapper import * + + +buf_size = 1024 +hop_size = 256 +channels = 2 + +class aubio_phasevoc_test(unittest.TestCase): + + def setUp(self): + self.o = new_aubio_pvoc(buf_size, hop_size, channels) + + def tearDown(self): + del_aubio_pvoc(self.o) + + def test_create(self): + """ test creation and deletion of phasevoc object """ + pass + + def test_zeroes(self): + """ test phasevoc object on zeroes """ + input = new_fvec(hop_size, channels) + fftgrain = new_cvec(buf_size, channels) + aubio_pvoc_do (self.o, input, fftgrain) + aubio_pvoc_rdo(self.o, fftgrain, input) + for index in range(buf_size): + for channel in range(channels): + self.assertEqual(0., fvec_read_sample(input, channel, index)) -- 2.26.2