From 2cef260f92785971d7d61489c2278ad7afae0dd7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 21 Feb 2007 02:30:09 +0000 Subject: Tempo based time in Machina (and related utilities added to Raul). git-svn-id: http://svn.drobilla.net/lad/raul@324 a436a847-0d15-0410-975c-d299462d15a1 --- tests/time_test.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/time_test.cpp (limited to 'tests/time_test.cpp') diff --git a/tests/time_test.cpp b/tests/time_test.cpp new file mode 100644 index 0000000..0eb0a83 --- /dev/null +++ b/tests/time_test.cpp @@ -0,0 +1,29 @@ +#include +#include + +using namespace std; +using namespace Raul; + + +int +main() +{ + TimeSlice ts(1/48000.0, 120); + + string in_string; + double in_double = 0; + + cout << "Beats: "; + cin >> in_double; + + cout << "\tSeconds: "; + cout << ts.beats_to_seconds(in_double); + cout << endl; + + cout << "\tTicks: "; + cout << ts.beats_to_ticks(in_double); + cout << endl; + + return 0; +} + -- cgit v1.2.1