diff options
author | David Robillard <d@drobilla.net> | 2007-02-22 04:16:05 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-02-22 04:16:05 +0000 |
commit | 7fbc7c297c0a5b4f23bfd285789ad55b72f792f3 (patch) | |
tree | 0a9ff36ffdb51e17bd0ebbfab9f10d353f1baa2c /tests | |
parent | 2cef260f92785971d7d61489c2278ad7afae0dd7 (diff) | |
download | raul-7fbc7c297c0a5b4f23bfd285789ad55b72f792f3.tar.gz raul-7fbc7c297c0a5b4f23bfd285789ad55b72f792f3.tar.bz2 raul-7fbc7c297c0a5b4f23bfd285789ad55b72f792f3.zip |
Machina quantization, various timing related fixes.
git-svn-id: http://svn.drobilla.net/lad/raul@326 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/quantize_test.cpp | 28 | ||||
-rw-r--r-- | tests/time_test.cpp | 1 |
3 files changed, 31 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 05b0f21..9e8e6c8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,7 +3,7 @@ if BUILD_TESTS AM_CXXFLAGS = -I.. -lpthread @RASQAL_CFLAGS@ @GLIBMM_CFLAGS@ ALL_LIBS = @RASQAL_LIBS@ @GLIBMM_LIBS@ ../src/libraul.la -bin_PROGRAMS = path_test thread_test queue_test atomic_test list_test time_test +bin_PROGRAMS = path_test thread_test queue_test atomic_test list_test time_test quantize_test thread_test_LDADD = $(ALL_LIBS) path_test_LDADD = $(ALL_LIBS) @@ -11,6 +11,7 @@ queue_test_LDADD = $(ALL_LIBS) atomic_test_LDADD = $(ALL_LIBS) list_test_LDADD = $(ALL_LIBS) time_test_LDADD = $(ALL_LIBS) +quantize_test_LDADD = $(ALL_LIBS) path_test_SOURCES = path_test.cpp thread_test_SOURCES = thread_test.cpp @@ -18,5 +19,6 @@ queue_test_SOURCES = queue_test.cpp atomic_test_SOURCES = atomic_test.cpp list_test_SOURCES = list_test.cpp time_test_SOURCES = time_test.cpp +quantize_test_SOURCES = quantize_test.cpp endif diff --git a/tests/quantize_test.cpp b/tests/quantize_test.cpp new file mode 100644 index 0000000..434df2e --- /dev/null +++ b/tests/quantize_test.cpp @@ -0,0 +1,28 @@ +#include <iostream> +#include <raul/Quantizer.h> + +using namespace std; +using namespace Raul; + + +int +main() +{ + double q = 0; + double beats = 0; + + cout << "Quantization: "; + cin >> q; + cout << endl; + + while (true) { + cout << "Beats: "; + cin >> beats; + + cout << "Quantized: "; + cout << Quantizer::quantize(q, beats) << endl << endl; + } + + return 0; +} + diff --git a/tests/time_test.cpp b/tests/time_test.cpp index 0eb0a83..0ffdc61 100644 --- a/tests/time_test.cpp +++ b/tests/time_test.cpp @@ -10,7 +10,6 @@ main() { TimeSlice ts(1/48000.0, 120); - string in_string; double in_double = 0; cout << "Beats: "; |