Add get_test_sample_rate to common test functions in libardour tests

This commit is contained in:
Tim Mayberry 2013-08-10 13:14:52 +10:00
parent ac8ec14347
commit d30fa04013
3 changed files with 9 additions and 1 deletions

View File

@ -42,7 +42,7 @@ AudioRegionTest::setUp ()
std::string const test_wav_path = Glib::build_filename (new_test_output_dir(), "test.wav");
_playlist = PlaylistFactory::create (DataType::AUDIO, *_session, "test");
_audio_playlist = boost::dynamic_pointer_cast<AudioPlaylist> (_playlist);
_source = SourceFactory::createWritable (DataType::AUDIO, *_session, test_wav_path, "", false, Fs);
_source = SourceFactory::createWritable (DataType::AUDIO, *_session, test_wav_path, "", false, get_test_sample_rate ());
/* Write a staircase to the source */

View File

@ -51,3 +51,9 @@ new_test_output_dir ()
} while (g_mkdir_with_parents (new_test_dir.c_str(), 0755) != 0);
return new_test_dir;
}
int
get_test_sample_rate ()
{
return 44100;
}

View File

@ -25,4 +25,6 @@ PBD::SearchPath test_search_path ();
std::string new_test_output_dir ();
int get_test_sample_rate ();
#endif