Bug fix for OS-X xrun reporting, plus small efficiency change to getVersion() function.
authorGary Scavone <gary@music.mcgill.ca>
Tue, 11 Mar 2014 16:45:13 +0000 (12:45 -0400)
committerGary Scavone <gary@music.mcgill.ca>
Tue, 11 Mar 2014 16:45:13 +0000 (12:45 -0400)
RtAudio.cpp

index e5d12d17c96026b60dd986c2a64dae38568cbf76..efed868e185b26d8db4eb279102e5a5d4ec7e5c0 100644 (file)
@@ -77,7 +77,7 @@ const unsigned int RtApi::SAMPLE_RATES[] = {
 \r
 std::string RtAudio :: getVersion( void ) throw()\r
 {\r
-  return std::string( RTAUDIO_VERSION );\r
+  return RTAUDIO_VERSION;\r
 }\r
 \r
 void RtAudio :: getCompiledApi( std::vector<RtAudio::Api> &apis ) throw()\r
@@ -1324,6 +1324,7 @@ bool RtApiCore :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigne
 \r
   // Setup the device property listener for over/underload.\r
   property.mSelector = kAudioDeviceProcessorOverload;\r
+  property.mScope = kAudioObjectPropertyScopeGlobal;\r
   result = AudioObjectAddPropertyListener( id, &property, xrunListener, (void *) handle );\r
 \r
   return SUCCESS;\r