summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/simpl/base.cpp8
-rw-r--r--src/simpl/base.h9
-rw-r--r--tests/testbase.cpp8
3 files changed, 5 insertions, 20 deletions
diff --git a/src/simpl/base.cpp b/src/simpl/base.cpp
index cc9dc2c..42832d6 100644
--- a/src/simpl/base.cpp
+++ b/src/simpl/base.cpp
@@ -93,10 +93,6 @@ Frame::~Frame()
void Frame::init()
{
- audio.resize(_size);
- synth.resize(_size);
- residual.resize(_size);
- synth_residual.resize(_size);
_max_peaks = 100;
peaks.resize(_max_peaks);
_max_partials = 100;
@@ -111,10 +107,6 @@ int Frame::size()
void Frame::size(int new_size)
{
_size = new_size;
- audio.resize(_size);
- synth.resize(_size);
- residual.resize(_size);
- synth_residual.resize(_size);
}
int Frame::max_peaks()
diff --git a/src/simpl/base.h b/src/simpl/base.h
index 7649f86..a0064f1 100644
--- a/src/simpl/base.h
+++ b/src/simpl/base.h
@@ -30,6 +30,7 @@ namespace Simpl
{
typedef double number;
+typedef std::vector<number> samples;
// ---------------------------------------------------------------------------
// Peak
@@ -89,10 +90,10 @@ protected:
public:
Peaks peaks;
Partials partials;
- std::vector<number> audio;
- std::vector<number> synth;
- std::vector<number> residual;
- std::vector<number> synth_residual;
+ number* audio;
+ number* synth;
+ number* residual;
+ number* synth_residual;
Frame();
Frame(int frame_size);
diff --git a/tests/testbase.cpp b/tests/testbase.cpp
index 34cefde..4e1293a 100644
--- a/tests/testbase.cpp
+++ b/tests/testbase.cpp
@@ -125,10 +125,6 @@ protected:
void test_constructor()
{
CPPUNIT_ASSERT(frame->size() == 512);
- CPPUNIT_ASSERT(frame->audio.size() == 512);
- CPPUNIT_ASSERT(frame->synth.size() == 512);
- CPPUNIT_ASSERT(frame->residual.size() == 512);
- CPPUNIT_ASSERT(frame->synth_residual.size() == 512);
CPPUNIT_ASSERT(frame->max_peaks() == 100);
CPPUNIT_ASSERT(frame->peaks.size() == 100);
CPPUNIT_ASSERT(frame->max_partials() == 100);
@@ -139,10 +135,6 @@ protected:
{
frame->size(1024);
CPPUNIT_ASSERT(frame->size() == 1024);
- CPPUNIT_ASSERT(frame->audio.size() == 1024);
- CPPUNIT_ASSERT(frame->synth.size() == 1024);
- CPPUNIT_ASSERT(frame->residual.size() == 1024);
- CPPUNIT_ASSERT(frame->synth_residual.size() == 1024);
frame->size(512);
}