diff options
author | John Glover <j@johnglover.net> | 2012-09-12 20:15:41 +0200 |
---|---|---|
committer | John Glover <j@johnglover.net> | 2012-09-12 20:15:41 +0200 |
commit | 35f74ab36af2487423b2ef7b7d22438efe2e9fbd (patch) | |
tree | 3e3059c26f62558a48a6f46c19f4e75342fa7893 /tests | |
parent | f00a7c6907652ffaba77618d201bc144c25a7d2c (diff) | |
download | simpl-35f74ab36af2487423b2ef7b7d22438efe2e9fbd.tar.gz simpl-35f74ab36af2487423b2ef7b7d22438efe2e9fbd.tar.bz2 simpl-35f74ab36af2487423b2ef7b7d22438efe2e9fbd.zip |
[base, synthesis] Allow synthesis sample arrays
to be created and destroyed independently of
input audio sample arrays in Frame objects.
Fix bug in Cython synthesis wrapper that prevented
the hop size from being changed correctly.
Don't create memory in non-real-time synthesis
function as it is now managed by the Frame
object itself.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_synthesis.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_synthesis.cpp b/tests/test_synthesis.cpp index f4d215d..50ca6ed 100644 --- a/tests/test_synthesis.cpp +++ b/tests/test_synthesis.cpp @@ -39,8 +39,12 @@ protected: frames = synth->synth(frames); for(int i = 0; i < frames.size(); i++) { - CPPUNIT_ASSERT(frames[i]->num_peaks() > 0); - CPPUNIT_ASSERT(frames[i]->num_partials() > 0); + // if Loris thinPeaks is used, final frame will have no peaks + // so don't check it + if(i < frames.size() - 1) { + CPPUNIT_ASSERT(frames[i]->num_peaks() > 0); + CPPUNIT_ASSERT(frames[i]->num_partials() > 0); + } double energy = 0.f; for(int j = 0; j < synth->hop_size(); j++) { |