]> Repos - portaudio/commitdiff
Fix removal of device property change listeners.
authorphilburk <philburk@0f58301d-fd10-0410-b4af-bbb618454e57>
Thu, 18 Aug 2011 08:44:03 +0000 (08:44 +0000)
committerphilburk <philburk@0f58301d-fd10-0410-b4af-bbb618454e57>
Thu, 18 Aug 2011 08:44:03 +0000 (08:44 +0000)
This may fix some occasional memory corruption isses we were seeing in the loopback test.
I think the listeners may have gotten called after the stream was freed.

src/hostapi/coreaudio/pa_mac_core.c

index 9939be19ed57b25a2f1e14b8ab42269c9ec9bcec..0ebf20d092af75fb3decf4c64c919758f4a30bd1 100644 (file)
@@ -2546,7 +2546,7 @@ static PaError CloseStream( PaStream* s )
                
                if( stream->inputUnit )
         {
-            Boolean isInput = FALSE;
+            Boolean isInput = TRUE;
             CleanupDevicePropertyListeners( stream, stream->inputDevice, isInput );
                }