diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/CMakeLists.txt | 5 | ||||
-rw-r--r-- | examples/example.c | 14 |
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; +} |