From d57ef07e7a36defbf845d97678d46fe2684faf65 Mon Sep 17 00:00:00 2001 From: Dan Grahelj Date: Wed, 11 Aug 2021 16:18:56 +0200 Subject: [PATCH 1/3] Replace rounding with truncation for CoreAudio-like int-float conversions --- RtAudio.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/RtAudio.cpp b/RtAudio.cpp index 33f7938e..e8f3a817 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -10741,8 +10741,8 @@ void RtApi :: convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info Float32 *in = (Float32 *)inBuffer; for (unsigned int i=0; i Date: Tue, 7 Sep 2021 14:19:27 +0200 Subject: [PATCH 2/3] Add Unicode build option --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21da42ac..07df5149 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,13 @@ option(RTAUDIO_API_PULSE "Build PulseAudio API" ${pulse_FOUND}) option(RTAUDIO_API_JACK "Build JACK audio server API" ${HAVE_JACK}) option(RTAUDIO_API_CORE "Build CoreAudio API" ${APPLE}) +# String encoding +option(RTAUDIO_UNICODE "Request UTF-8 encoded strings from system calls" OFF) + +if (RTAUDIO_UNICODE) + add_definitions(-DUNICODE) +endif () + # Check for functions include(CheckFunctionExists) check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) From ef9fe25428c9628731521a46024a613a24339ca0 Mon Sep 17 00:00:00 2001 From: Dan Grahelj Date: Wed, 8 Sep 2021 10:34:38 +0200 Subject: [PATCH 3/3] ALSA libraries variable patch --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07df5149..27a384d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,7 +135,7 @@ if (RTAUDIO_API_ALSA) message(FATAL_ERROR "ALSA API requested but no ALSA dev libraries found") endif() list(APPEND INCDIRS ${ALSA_INCLUDE_DIR}) - list(APPEND LINKLIBS ${ALSA_LIBRARY}) + list(APPEND LINKLIBS ${ALSA_LIBRARIES}) list(APPEND PKGCONFIG_REQUIRES "alsa") list(APPEND API_DEFS "-D__LINUX_ALSA__") list(APPEND API_LIST "alsa")