1 // this is included first to avoid Searchpath definition on windows
2 #include "test_common.h"
4 #include "pbd/file_utils.h"
5 #include "ardour/resampled_source.h"
6 #include "ardour/sndfileimportable.h"
7 #include "resampled_source_test.h"
10 CPPUNIT_TEST_SUITE_REGISTRATION (ResampledSourceTest);
13 using namespace ARDOUR;
17 ResampledSourceTest::seekTest ()
19 std::string test_file_path;
20 const string test_filename = "test.wav";
22 CPPUNIT_ASSERT (find_file_in_search_path (test_search_path (), test_filename, test_file_path));
24 boost::shared_ptr<SndFileImportableSource> s (new SndFileImportableSource (test_file_path));
25 ResampledImportableSource r (s, 48000, SrcBest);
27 /* Make sure that seek (0) has the desired effect, ie that
28 given the same input you get the same output after seek (0)
29 as you got when the Source was newly created.
40 for (int i = 0; i < 64; ++i) {
41 CPPUNIT_ASSERT (A[i] == B[i]);