mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
Fix up libardour tests.
git-svn-id: svn://localhost/ardour2/branches/3.0@7484 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
963bc50a8b
commit
118621c261
3 changed files with 19 additions and 21 deletions
|
|
@ -12,8 +12,6 @@ libs='libs'
|
||||||
|
|
||||||
export LD_LIBRARY_PATH=$libs/audiographer:$libs/vamp-sdk:$libs/surfaces:$libs/surfaces/control_protocol:$libs/ardour:$libs/midi++2:$libs/pbd:$libs/rubberband:$libs/soundtouch:$libs/gtkmm2ext:$libs/sigc++2:$libs/glibmm2:$libs/gtkmm2/atk:$libs/gtkmm2/pango:$libs/gtkmm2/gdk:$libs/gtkmm2/gtk:$libs/libgnomecanvasmm:$libs/libsndfile:$libs/appleutility:$libs/cairomm:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$libs/audiographer:$libs/vamp-sdk:$libs/surfaces:$libs/surfaces/control_protocol:$libs/ardour:$libs/midi++2:$libs/pbd:$libs/rubberband:$libs/soundtouch:$libs/gtkmm2ext:$libs/sigc++2:$libs/glibmm2:$libs/gtkmm2/atk:$libs/gtkmm2/pango:$libs/gtkmm2/gdk:$libs/gtkmm2/gtk:$libs/libgnomecanvasmm:$libs/libsndfile:$libs/appleutility:$libs/cairomm:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
|
||||||
|
|
||||||
if [ "$1" == "--debug" ]
|
if [ "$1" == "--debug" ]
|
||||||
then
|
then
|
||||||
gdb ./libs/ardour/run-tests
|
gdb ./libs/ardour/run-tests
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,15 @@ BBTTest::addTest ()
|
||||||
|
|
||||||
// Test basic operations with a flat tempo map
|
// Test basic operations with a flat tempo map
|
||||||
BBT_Time time = map.bbt_add(BBT_Time(1, 1, 0), BBT_Time(1, 2, 3));
|
BBT_Time time = map.bbt_add(BBT_Time(1, 1, 0), BBT_Time(1, 2, 3));
|
||||||
//cerr << "result: BBT_Time(" << time.bars << ", " << time.beats << ", "
|
//cout << "result: BBT_Time(" << time.bars << ", " << time.beats << ", "
|
||||||
// << time.ticks << ")" << endl;
|
// << time.ticks << ")" << endl;
|
||||||
CPPUNIT_ASSERT(time == BBT_Time(2, 3, 0));
|
CPPUNIT_ASSERT(time == BBT_Time(2, 3, 3));
|
||||||
|
|
||||||
|
|
||||||
time = map.bbt_add(BBT_Time(1, 2, 3), BBT_Time(2, 2, 3));
|
time = map.bbt_add(BBT_Time(1, 2, 3), BBT_Time(2, 2, 3));
|
||||||
//cerr << "result: BBT_Time(" << time.bars << ", " << time.beats << ", "
|
//cerr << "result: BBT_Time(" << time.bars << ", " << time.beats << ", "
|
||||||
// << time.ticks << ")" << endl;
|
// << time.ticks << ")" << endl;
|
||||||
CPPUNIT_ASSERT(time == BBT_Time(3, 4, 3));
|
CPPUNIT_ASSERT(time == BBT_Time(3, 4, 6));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ void
|
||||||
InterpolationTest::linearInterpolationTest ()
|
InterpolationTest::linearInterpolationTest ()
|
||||||
{
|
{
|
||||||
nframes_t result = 0;
|
nframes_t result = 0;
|
||||||
cout << "\nLinear Interpolation Test\n";
|
// cout << "\nLinear Interpolation Test\n";
|
||||||
|
|
||||||
cout << "\nSpeed: 1/3";
|
// cout << "\nSpeed: 1/3";
|
||||||
for (int i = 0; 3*i < NUM_SAMPLES - 1024;) {
|
for (int i = 0; 3*i < NUM_SAMPLES - 1024;) {
|
||||||
linear.set_speed (double(1.0)/double(3.0));
|
linear.set_speed (double(1.0)/double(3.0));
|
||||||
linear.set_target_speed (double(1.0)/double(3.0));
|
linear.set_target_speed (double(1.0)/double(3.0));
|
||||||
|
|
@ -20,7 +20,7 @@ InterpolationTest::linearInterpolationTest ()
|
||||||
i += result;
|
i += result;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "\nSpeed: 1.0";
|
// cout << "\nSpeed: 1.0";
|
||||||
linear.reset();
|
linear.reset();
|
||||||
linear.set_speed (1.0);
|
linear.set_speed (1.0);
|
||||||
linear.set_target_speed (linear.speed());
|
linear.set_target_speed (linear.speed());
|
||||||
|
|
@ -30,7 +30,7 @@ InterpolationTest::linearInterpolationTest ()
|
||||||
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "\nSpeed: 0.5";
|
// cout << "\nSpeed: 0.5";
|
||||||
linear.reset();
|
linear.reset();
|
||||||
linear.set_speed (0.5);
|
linear.set_speed (0.5);
|
||||||
linear.set_target_speed (linear.speed());
|
linear.set_target_speed (linear.speed());
|
||||||
|
|
@ -40,14 +40,14 @@ InterpolationTest::linearInterpolationTest ()
|
||||||
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "\nSpeed: 0.2";
|
// cout << "\nSpeed: 0.2";
|
||||||
linear.reset();
|
linear.reset();
|
||||||
linear.set_speed (0.2);
|
linear.set_speed (0.2);
|
||||||
linear.set_target_speed (linear.speed());
|
linear.set_target_speed (linear.speed());
|
||||||
result = linear.interpolate (0, NUM_SAMPLES, input, output);
|
result = linear.interpolate (0, NUM_SAMPLES, input, output);
|
||||||
CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * linear.speed()), result);
|
CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * linear.speed()), result);
|
||||||
|
|
||||||
cout << "\nSpeed: 0.02";
|
// cout << "\nSpeed: 0.02";
|
||||||
linear.reset();
|
linear.reset();
|
||||||
linear.set_speed (0.02);
|
linear.set_speed (0.02);
|
||||||
linear.set_target_speed (linear.speed());
|
linear.set_target_speed (linear.speed());
|
||||||
|
|
@ -64,7 +64,7 @@ InterpolationTest::linearInterpolationTest ()
|
||||||
CPPUNIT_ASSERT_EQUAL ((nframes_t)(NUM_SAMPLES * linear.speed()), result);
|
CPPUNIT_ASSERT_EQUAL ((nframes_t)(NUM_SAMPLES * linear.speed()), result);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cout << "\nSpeed: 2.0";
|
// cout << "\nSpeed: 2.0";
|
||||||
linear.reset();
|
linear.reset();
|
||||||
linear.set_speed (2.0);
|
linear.set_speed (2.0);
|
||||||
linear.set_target_speed (linear.speed());
|
linear.set_target_speed (linear.speed());
|
||||||
|
|
@ -74,7 +74,7 @@ InterpolationTest::linearInterpolationTest ()
|
||||||
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "\nSpeed: 10.0";
|
// cout << "\nSpeed: 10.0";
|
||||||
linear.set_speed (10.0);
|
linear.set_speed (10.0);
|
||||||
linear.set_target_speed (linear.speed());
|
linear.set_target_speed (linear.speed());
|
||||||
result = linear.interpolate (0, NUM_SAMPLES / 10, input, output);
|
result = linear.interpolate (0, NUM_SAMPLES / 10, input, output);
|
||||||
|
|
@ -93,9 +93,9 @@ void
|
||||||
InterpolationTest::cubicInterpolationTest ()
|
InterpolationTest::cubicInterpolationTest ()
|
||||||
{
|
{
|
||||||
nframes_t result = 0;
|
nframes_t result = 0;
|
||||||
cout << "\nCubic Interpolation Test\n";
|
// cout << "\nCubic Interpolation Test\n";
|
||||||
|
|
||||||
cout << "\nSpeed: 1/3";
|
// cout << "\nSpeed: 1/3";
|
||||||
for (int i = 0; 3*i < NUM_SAMPLES - 1024;) {
|
for (int i = 0; 3*i < NUM_SAMPLES - 1024;) {
|
||||||
cubic.set_speed (double(1.0)/double(3.0));
|
cubic.set_speed (double(1.0)/double(3.0));
|
||||||
cubic.set_target_speed (double(1.0)/double(3.0));
|
cubic.set_target_speed (double(1.0)/double(3.0));
|
||||||
|
|
@ -103,7 +103,7 @@ InterpolationTest::cubicInterpolationTest ()
|
||||||
i += result;
|
i += result;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "\nSpeed: 1.0";
|
// cout << "\nSpeed: 1.0";
|
||||||
cubic.reset();
|
cubic.reset();
|
||||||
cubic.set_speed (1.0);
|
cubic.set_speed (1.0);
|
||||||
cubic.set_target_speed (cubic.speed());
|
cubic.set_target_speed (cubic.speed());
|
||||||
|
|
@ -113,7 +113,7 @@ InterpolationTest::cubicInterpolationTest ()
|
||||||
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "\nSpeed: 0.5";
|
// cout << "\nSpeed: 0.5";
|
||||||
cubic.reset();
|
cubic.reset();
|
||||||
cubic.set_speed (0.5);
|
cubic.set_speed (0.5);
|
||||||
cubic.set_target_speed (cubic.speed());
|
cubic.set_target_speed (cubic.speed());
|
||||||
|
|
@ -123,14 +123,14 @@ InterpolationTest::cubicInterpolationTest ()
|
||||||
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "\nSpeed: 0.2";
|
// cout << "\nSpeed: 0.2";
|
||||||
cubic.reset();
|
cubic.reset();
|
||||||
cubic.set_speed (0.2);
|
cubic.set_speed (0.2);
|
||||||
cubic.set_target_speed (cubic.speed());
|
cubic.set_target_speed (cubic.speed());
|
||||||
result = cubic.interpolate (0, NUM_SAMPLES, input, output);
|
result = cubic.interpolate (0, NUM_SAMPLES, input, output);
|
||||||
CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * cubic.speed()), result);
|
CPPUNIT_ASSERT_EQUAL ((uint32_t)(NUM_SAMPLES * cubic.speed()), result);
|
||||||
|
|
||||||
cout << "\nSpeed: 0.02";
|
// cout << "\nSpeed: 0.02";
|
||||||
cubic.reset();
|
cubic.reset();
|
||||||
cubic.set_speed (0.02);
|
cubic.set_speed (0.02);
|
||||||
cubic.set_target_speed (cubic.speed());
|
cubic.set_target_speed (cubic.speed());
|
||||||
|
|
@ -147,7 +147,7 @@ InterpolationTest::cubicInterpolationTest ()
|
||||||
CPPUNIT_ASSERT_EQUAL ((nframes_t)(NUM_SAMPLES * cubic.speed()), result);
|
CPPUNIT_ASSERT_EQUAL ((nframes_t)(NUM_SAMPLES * cubic.speed()), result);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cout << "\nSpeed: 2.0";
|
// cout << "\nSpeed: 2.0";
|
||||||
cubic.reset();
|
cubic.reset();
|
||||||
cubic.set_speed (2.0);
|
cubic.set_speed (2.0);
|
||||||
cubic.set_target_speed (cubic.speed());
|
cubic.set_target_speed (cubic.speed());
|
||||||
|
|
@ -157,7 +157,7 @@ InterpolationTest::cubicInterpolationTest ()
|
||||||
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
CPPUNIT_ASSERT_EQUAL (1.0f, output[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "\nSpeed: 10.0";
|
// cout << "\nSpeed: 10.0";
|
||||||
cubic.set_speed (10.0);
|
cubic.set_speed (10.0);
|
||||||
cubic.set_target_speed (cubic.speed());
|
cubic.set_target_speed (cubic.speed());
|
||||||
result = cubic.interpolate (0, NUM_SAMPLES / 10, input, output);
|
result = cubic.interpolate (0, NUM_SAMPLES / 10, input, output);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue