From d3a90be424952e9a4d0e1e571c489b6e0e0fea62 Mon Sep 17 00:00:00 2001 From: stefonzo Date: Thu, 8 Sep 2022 22:11:51 -0500 Subject: add experiment program --- examples/CMakeLists.txt | 10 ++++++++++ examples/wav.c | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 examples/wav.c (limited to 'examples') diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 3797392..7e783ee 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -25,3 +25,13 @@ target_link_libraries(mp3 mossrose) add_dependencies(examples mp3) file(COPY ${CMAKE_CURRENT_LIST_DIR}/sine-mono.mp3 DESTINATION .) file(COPY ${CMAKE_CURRENT_LIST_DIR}/weird-stereo.mp3 DESTINATION .) + +add_executable(wave ${CMAKE_CURRENT_LIST_DIR}/wav.c) +target_link_libraries(wave mossrose) +add_dependencies(examples wave) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/mono-16bit-pcm.wav DESTINATION .) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/mono-24bit-pcm.wav DESTINATION .) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/mono-float-pcm.wav DESTINATION .) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/stereo-16bit-pcm.wav DESTINATION .) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/stereo-24bit-pcm.wav DESTINATION .) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/stereo-float-pcm.wav DESTINATION .) diff --git a/examples/wav.c b/examples/wav.c new file mode 100644 index 0000000..6d6f336 --- /dev/null +++ b/examples/wav.c @@ -0,0 +1,13 @@ +#include +#include + +int main() +{ + mossrose_load_wav("mono-16bit-pcm.wav"); + mossrose_load_wav("mono-24bit-pcm.wav"); + mossrose_load_wav("mono-float-pcm.wav"); + mossrose_load_wav("stereo-16bit-pcm.wav"); + mossrose_load_wav("stereo-16bit-pcm.wav"); + mossrose_load_wav("stereo-16bit-pcm.wav"); + return 0; +} -- cgit v1.2.1