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) {