diff options
| -rw-r--r-- | RtAudio.cpp | 9 | ||||
| -rw-r--r-- | configure.ac | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp index efed868..7d60e77 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -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:
diff --git a/configure.ac b/configure.ac index df34d03..6d6474d 100644 --- a/configure.ac +++ b/configure.ac @@ -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" |
