mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +01:00
Add get_test_sample_rate to common test functions in libardour tests
This commit is contained in:
parent
ac8ec14347
commit
d30fa04013
3 changed files with 9 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ AudioRegionTest::setUp ()
|
||||||
std::string const test_wav_path = Glib::build_filename (new_test_output_dir(), "test.wav");
|
std::string const test_wav_path = Glib::build_filename (new_test_output_dir(), "test.wav");
|
||||||
_playlist = PlaylistFactory::create (DataType::AUDIO, *_session, "test");
|
_playlist = PlaylistFactory::create (DataType::AUDIO, *_session, "test");
|
||||||
_audio_playlist = boost::dynamic_pointer_cast<AudioPlaylist> (_playlist);
|
_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 */
|
/* Write a staircase to the source */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,3 +51,9 @@ new_test_output_dir ()
|
||||||
} while (g_mkdir_with_parents (new_test_dir.c_str(), 0755) != 0);
|
} while (g_mkdir_with_parents (new_test_dir.c_str(), 0755) != 0);
|
||||||
return new_test_dir;
|
return new_test_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
get_test_sample_rate ()
|
||||||
|
{
|
||||||
|
return 44100;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,4 +25,6 @@ PBD::SearchPath test_search_path ();
|
||||||
|
|
||||||
std::string new_test_output_dir ();
|
std::string new_test_output_dir ();
|
||||||
|
|
||||||
|
int get_test_sample_rate ();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue