From f851c2ac5daa40d69d4146bc5678fc96a4b9b637 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Tue, 2 Sep 2014 00:13:17 +0300 Subject: [PATCH 1/4] Register is no more in modern C++. --- RtAudio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RtAudio.cpp b/RtAudio.cpp index cc81fc9..8755b55 100755 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -10142,8 +10142,8 @@ void RtApi :: convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info void RtApi :: byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format ) { - register char val; - register char *ptr; + char val; + char *ptr; ptr = buffer; if ( format == RTAUDIO_SINT16 ) { From 3a3d648108cdaa53d1199aa3c15a4b8878693f65 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Tue, 2 Sep 2014 00:13:26 +0300 Subject: [PATCH 2/4] Disable policy change for cmake 3.0 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d419e1d..4085aa0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,6 +113,7 @@ if (WIN32) endif (AUDIO_WINDOWS_ASIO) endif (WIN32) +cmake_policy(SET CMP0042 OLD) add_library(rtaudio SHARED ${rtaudio_SOURCES}) add_library(rtaudio_static STATIC ${rtaudio_SOURCES}) From 73339493aeb2ecba8568b268f98a790420b7db41 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Tue, 22 Sep 2015 18:46:47 +0300 Subject: [PATCH 3/4] Add ALSA include directories to fix compile on some systems. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4085aa0..9de6a85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,7 @@ elseif (UNIX AND NOT APPLE) if (NOT ALSA_FOUND) message(FATAL_ERROR "ALSA API requested but no ALSA dev libraries found") endif() + include_directories(${ALSA_INCLUDE_DIR}) list(APPEND LINKLIBS ${ALSA_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) add_definitions(-D__LINUX_ALSA__) message(STATUS "Using Linux ALSA") From 33ce5cdac68e575320f6f867c731536267d79b35 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Tue, 22 Sep 2015 19:02:52 +0300 Subject: [PATCH 4/4] Don't take address of boolean flag, use flag itself instead. --- RtAudio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RtAudio.cpp b/RtAudio.cpp index 8755b55..3875761 100755 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -8070,7 +8070,7 @@ static void *alsaCallbackHandler( void *ptr ) bool *isRunning = &info->isRunning; #ifdef SCHED_RR // Undefined with some OSes (eg: NetBSD 1.6.x with GNU Pthread) - if ( &info->doRealtime ) { + if ( info->doRealtime ) { pthread_t tID = pthread_self(); // ID of this thread sched_param prio = { info->priority }; // scheduling priority of thread pthread_setschedparam( tID, SCHED_RR, &prio );