Bug fixes for ALSA buffersize setting and new OS X 10.5 variable (GS).
[rtaudio.git] / tests / record.cpp
index a56f3514b8ba3dc371938070b918fc09d2907071..4457f938281f0a3da434714ea4b0299a4b304f8f 100644 (file)
@@ -153,9 +153,8 @@ int main( int argc, char *argv[] )
   }
 
   std::cout << "\nRecording for " << time << " seconds ... writing file 'record.raw' (buffer frames = " << bufferFrames << ")." << std::endl;
-  while ( 1 ) {
+  while ( adc.isStreamRunning() ) {
     SLEEP( 100 ); // wake every 100 ms to check if we're done
-    if ( adc.isStreamRunning() == false ) break;
   }
 
   // Now write the entire data to the file.