From ae0f4556150ced49615c75a0b9e8d6cf11ab50bd Mon Sep 17 00:00:00 2001 From: Nick Porcino Date: Tue, 23 Apr 2019 23:00:55 -0700 Subject: [PATCH] Port examples to Mac --- CMakeLists.txt | 10 +++++++++- include/libnyquist/Common.h | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb871cb..a263fd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,6 +260,14 @@ if(BUILD_EXAMPLE) RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" ) - target_link_libraries(${NQR_EXAMPLE_APP_NAME} PUBLIC libnyquist libopus libwavpack) + if(APPLE) + set(DARWIN_LIBS + "-framework AudioToolbox" + "-framework AudioUnit" + "-framework Accelerate" + "-framework CoreAudio" + "-framework Cocoa") + ENDIF(APPLE) + target_link_libraries(${NQR_EXAMPLE_APP_NAME} PUBLIC ${DARWIN_LIBS} libnyquist libopus libwavpack) endif() diff --git a/include/libnyquist/Common.h b/include/libnyquist/Common.h index 0362489..050f146 100644 --- a/include/libnyquist/Common.h +++ b/include/libnyquist/Common.h @@ -269,7 +269,7 @@ class Dither DitherType d; public: - Dither(DitherType d) : distribution(-0.5f, +0.5f), d(d), previous(0.f) {} + Dither(DitherType d) : distribution(-0.5f, +0.5f), previous(0.f), d(d) {} float operator()(float s) {