Browse Source

Fix for ALSA runnable flag update mistake; moved streamname declaration in PULSE code to avoid compiler complaint.

tags/4.1.0
Gary Scavone 10 years ago
parent
commit
a71027332b
2 changed files with 7 additions and 6 deletions
  1. +5
    -4
      RtAudio.cpp
  2. +2
    -2
      configure.ac

+ 5
- 4
RtAudio.cpp View File

@@ -180,14 +180,15 @@ RtAudio :: RtAudio( RtAudio::Api api ) throw()
// It should not be possible to get here because the preprocessor
// definition __RTAUDIO_DUMMY__ is automatically defined if no
// API-specific definitions are passed to the compiler. But just in
// case something weird happens, we'll print out an error message.
// case something weird happens, we'll thow an error.
std::string errorText = "\nRtAudio: no compiled API support found ... critical error!!\n\n";
throw( RtAudioError( errorText, RtAudioError::UNSPECIFIED ) );
}
RtAudio :: ~RtAudio() throw()
{
delete rtapi_;
if ( rtapi_ )
delete rtapi_;
}
void RtAudio :: openStream( RtAudio::StreamParameters *outputParameters,
@@ -6143,7 +6144,6 @@ void RtApiAlsa :: startStream()
stream_.state = STREAM_RUNNING;
unlock:
apiInfo->runnable = false; // fixes high CPU usage when stopped
pthread_cond_signal( &apiInfo->runnable_cv );
MUTEX_UNLOCK( &stream_.mutex );
@@ -6229,6 +6229,7 @@ void RtApiAlsa :: abortStream()
}
unlock:
apiInfo->runnable = false; // fixes high CPU usage when stopped
MUTEX_UNLOCK( &stream_.mutex );
if ( result >= 0 ) return;
@@ -6804,6 +6805,7 @@ bool RtApiPulse::probeDeviceOpen( unsigned int device, StreamMode mode,
stream_.nUserChannels[mode] = channels;
stream_.nDeviceChannels[mode] = channels + firstChannel;
stream_.channelOffset[mode] = 0;
std::string streamName = "RtAudio";
// Allocate necessary internal buffers.
bufferBytes = stream_.nUserChannels[mode] * *bufferSize * formatBytes( stream_.userFormat );
@@ -6857,7 +6859,6 @@ bool RtApiPulse::probeDeviceOpen( unsigned int device, StreamMode mode,
pah = static_cast<PulseAudioHandle *>( stream_.apiHandle );
int error;
std::string streamName = "RtAudio";
if ( !options->streamName.empty() ) streamName = options->streamName;
switch ( mode ) {
case INPUT:


+ 2
- 2
configure.ac View File

@@ -45,7 +45,7 @@ AC_ARG_ENABLE(debug,
AC_CHECK_FUNC(gettimeofday, [cppflag="$cppflag -DHAVE_GETTIMEOFDAY"], )

# Set paths if prefix is defined
if test x"$prefix" != x && test x$prefix != xNONE; then
if test "x$prefix" != "x" && test "x$prefix" != "xNONE"; then
LIBS="$LIBS -L$prefix/lib"
CPPFLAGS="$CPPFLAGS -I$prefix/include"
fi
@@ -59,7 +59,7 @@ CXXFLAGS="$cxxflag"

# Check compiler and use -Wall if gnu.
if [test $GXX = "yes" ;] then
AC_SUBST( cxxflag, [-Wall] )
AC_SUBST( cxxflag, ["-Wall -Wextra"] )
fi

CXXFLAGS="$CXXFLAGS $cxxflag"


Loading…
Cancel
Save