summaryrefslogtreecommitdiffstats
path: root/tests/time_test.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-21 02:30:09 +0000
committerDavid Robillard <d@drobilla.net>2007-02-21 02:30:09 +0000
commit2cef260f92785971d7d61489c2278ad7afae0dd7 (patch)
tree308369a7102750714685d4e2d2351ec94e53898c /tests/time_test.cpp
parent58fa57acec95fc590fb2b53c512a5c300e6049a6 (diff)
downloadraul-2cef260f92785971d7d61489c2278ad7afae0dd7.tar.gz
raul-2cef260f92785971d7d61489c2278ad7afae0dd7.tar.bz2
raul-2cef260f92785971d7d61489c2278ad7afae0dd7.zip
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
Diffstat (limited to 'tests/time_test.cpp')
-rw-r--r--tests/time_test.cpp29
1 files changed, 29 insertions, 0 deletions
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 <iostream>
+#include <raul/TimeSlice.h>
+
+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;
+}
+