zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 8a164611c2b97239c3a1f1d90cd2c4da74f50542
parent 941cfdcf29cee9d215bb36f3090b14b5fdefbbbd
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Sat,  1 May 2010 18:53:27 -0400

Samples: Stage 1 of deprication

Diffstat:
Msrc/Samples/CMakeLists.txt | 2--
Msrc/Tests/CMakeLists.txt | 2+-
Msrc/Tests/SampleTest.h | 20++++++++++----------
3 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/Samples/CMakeLists.txt b/src/Samples/CMakeLists.txt @@ -1,6 +1,4 @@ set(zynaddsubfx_samples_SRCS - AuSample.cpp - FqSample.cpp Sample.cpp ) diff --git a/src/Tests/CMakeLists.txt b/src/Tests/CMakeLists.txt @@ -1,6 +1,6 @@ unit_test(ControllerTest ControllerTest.h ../Params/Controller.h) unit_test(EchoTest EchoTest.h ../Effects/Echo.h) -unit_test(SampleTest SampleTest.h ../Samples/AuSample.h) +unit_test(SampleTest SampleTest.h ../Samples/Sample.h) unit_test(MicrotonalTest MicrotonalTest.h ../Misc/Microtonal.h) unit_test(XMLwrapperTest XMLwrapperTest.h ../Misc/XMLwrapper.h) unit_test(ADnoteTest AdNoteTest.h ../Synth/ADnote.h) diff --git a/src/Tests/SampleTest.h b/src/Tests/SampleTest.h @@ -20,34 +20,34 @@ */ #include <cxxtest/TestSuite.h> -#include "../Samples/AuSample.h" +#include "../Samples/Sample.h" class SampleTest:public CxxTest::TestSuite { public: void testInit() { - AuSample smp(10); + Sample smp(10); TS_ASSERT_EQUALS(smp.size(), 10); for(int i = 0; i < 20; ++i) TS_ASSERT_EQUALS(smp[i], 0.0); - AuSample nsmp(5, 15.0); + Sample nsmp(5, 15.0); TS_ASSERT_EQUALS(nsmp.size(), 5); TS_ASSERT_EQUALS(nsmp[4], 15.0); } void testAssign() { - AuSample smp(3); + Sample smp(3); smp[0] = 0; smp[1] = 1; smp[2] = 2; - AuSample nsmp(40); + Sample nsmp(40); nsmp = smp; TS_ASSERT_EQUALS(smp.size(), nsmp.size()); for(int i = 0; i < 29; ++i) TS_ASSERT_EQUALS(smp[i], nsmp[i]); } void testBounds() { - AuSample smp(0); + Sample smp(0); TS_ASSERT(smp.size() != 0); } @@ -55,16 +55,16 @@ class SampleTest:public CxxTest::TestSuite float *fl = new float[50]; for(int i = 0; i < 50; ++i) *(fl + i) = i; - AuSample smp(2); - smp = AuSample(50, fl); + Sample smp(2); + smp = Sample(50, fl); delete [] fl; for(int i = 0; i < 50; ++i) TS_ASSERT_DELTA(smp[i], i, 0.001); - smp = AuSample(3); + smp = Sample(3); } void testClear() { - AuSample smp(50); + Sample smp(50); for(int i = 0; i < 50; ++i) smp[i] = 10; smp.clear();