summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-11-12 21:04:06 +0000
committerCarl Hetherington <cth@carlh.net>2012-11-12 21:04:06 +0000
commit17cea71c34ed6bdba67aac8614572c7511844c2a (patch)
tree41464576c5e2e6ab360789faf4b5fcc4358ee556 /test
parent13b935067e892875ea9e76c3d63fcc11d2c429b0 (diff)
Untested; more movement of stuff out of decoder.
Diffstat (limited to 'test')
-rw-r--r--test/test.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/test/test.cc b/test/test.cc
index 3a1d6f7d4..423501296 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -177,10 +177,18 @@ BOOST_AUTO_TEST_CASE (dvd_test)
BOOST_CHECK_EQUAL (i->size, 7);
}
+class NullLog : public Log
+{
+public:
+ void do_log (string) {}
+};
+
void
do_positive_delay_line_test (int delay_length, int data_length)
{
- DelayLine d (6, delay_length);
+ NullLog log;
+
+ DelayLine d (&log, 6, delay_length);
shared_ptr<AudioBuffers> data (new AudioBuffers (6, data_length));
int in = 0;
@@ -196,7 +204,8 @@ do_positive_delay_line_test (int delay_length, int data_length)
}
}
- d.feed (data);
+ /* This only works because the delay line modifies the parameter */
+ d.process_audio (data);
returned += data->frames ();
for (int j = 0; j < data->frames(); ++j) {
@@ -220,7 +229,9 @@ do_positive_delay_line_test (int delay_length, int data_length)
void
do_negative_delay_line_test (int delay_length, int data_length)
{
- DelayLine d (6, delay_length);
+ NullLog log;
+
+ DelayLine d (&log, 6, delay_length);
shared_ptr<AudioBuffers> data (new AudioBuffers (6, data_length));
int in = 0;
@@ -236,7 +247,8 @@ do_negative_delay_line_test (int delay_length, int data_length)
}
}
- d.feed (data);
+ /* This only works because the delay line modifies the parameter */
+ d.process_audio (data);
returned += data->frames ();
for (int j = 0; j < data->frames(); ++j) {