3 #include "pbd/file_utils.h"
4 #include "ardour/resampled_source.h"
5 #include "ardour/sndfileimportable.h"
6 #include "resampled_source_test.h"
9 CPPUNIT_TEST_SUITE_REGISTRATION (ResampledSourceTest);
12 using namespace ARDOUR;
16 ResampledSourceTest::seekTest ()
18 std::string test_file_path;
19 const string test_filename = "test.wav";
21 CPPUNIT_ASSERT (find_file (test_search_path (), test_filename, test_file_path));
23 boost::shared_ptr<SndFileImportableSource> s (new SndFileImportableSource (test_file_path));
24 ResampledImportableSource r (s, 48000, SrcBest);
26 /* Make sure that seek (0) has the desired effect, ie that
27 given the same input you get the same output after seek (0)
28 as you got when the Source was newly created.
39 for (int i = 0; i < 64; ++i) {
40 CPPUNIT_ASSERT (A[i] == B[i]);