Browse Source

Merge pull request #42 from berkus/master

Multiple minor compile fixes with modern C++
tags/4.1.2
garyscavone 10 years ago
parent
commit
2e50a308a8
2 changed files with 5 additions and 3 deletions
  1. +2
    -0
      CMakeLists.txt
  2. +3
    -3
      RtAudio.cpp

+ 2
- 0
CMakeLists.txt View File

@@ -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")
@@ -113,6 +114,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})



+ 3
- 3
RtAudio.cpp View File

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


Loading…
Cancel
Save