summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-08-25 14:54:53 -0500
committersanine <sanine.not@pm.me>2022-08-25 14:54:53 -0500
commit37c97e345d12f95dde44e1d1a4c2f2aadd4615bc (patch)
treee1bb25bc855883062bdd7847ff2c04290f71c840 /examples
parent5634c7b04da619669f2f29f6798c03982be05180 (diff)
add initial structure
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt5
-rw-r--r--examples/example.c14
2 files changed, 19 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
new file mode 100644
index 0000000..49dd924
--- /dev/null
+++ b/examples/CMakeLists.txt
@@ -0,0 +1,5 @@
+project(mossrose)
+
+add_executable(example ${CMAKE_CURRENT_LIST_DIR}/example.c)
+target_link_libraries(example mossrose)
+add_dependencies(examples example)
diff --git a/examples/example.c b/examples/example.c
new file mode 100644
index 0000000..960b9f2
--- /dev/null
+++ b/examples/example.c
@@ -0,0 +1,14 @@
+#include <mossrose.h>
+#include <portaudio.h>
+
+
+#define SAMPLE_RATE 44100
+#define N_CHANNELS 8
+
+int main()
+{
+ mr_init(SAMPLE_RATE, N_CHANNELS);
+ Pa_Sleep(3000);
+ mr_terminate();
+ return 0;
+}