Stop PulseAudio callback busy-waiting when stream is stopped.
authorCarl Hetherington <cth@carlh.net>
Mon, 15 Apr 2019 11:24:46 +0000 (12:24 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 15 Apr 2019 19:48:45 +0000 (20:48 +0100)
RtAudio.cpp

index f38c60f0d8461521ed8043e33f020ea80fb0ec3e..d80660e70addcbf12cacbd532129eddfc488206b 100644 (file)
@@ -8673,6 +8673,7 @@ void RtApiPulse::stopStream( void )
   }
 
   stream_.state = STREAM_STOPPED;
+  pah->runnable = false;
   MUTEX_LOCK( &stream_.mutex );
 
   if ( pah && pah->s_play ) {
@@ -8707,6 +8708,7 @@ void RtApiPulse::abortStream( void )
   }
 
   stream_.state = STREAM_STOPPED;
+  pah->runnable = false;
   MUTEX_LOCK( &stream_.mutex );
 
   if ( pah && pah->s_play ) {