sample/vs_android.cc
/**
 * Drain the recording stream of any existing data by reading from it until it's empty. This is
 * usually run to clear out any stale data before performing an actual read operation, thereby
 * obtaining the most recently recorded data and the best possbile recording latency.
 *
 * @param audioData A buffer which the existing data can be read into
 * @param numFrames The number of frames to read in a single read operation, this is typically the
 * size of `audioData`.
 */
Drain the recording stream of any existing data by reading from it until it's empty. This is
usually run to clear out any stale data before performing an actual read operation, thereby
obtaining the most recently recorded data and the best possbile recording latency.

@param audioData A buffer which the existing data can be read into
@param numFrames The number of frames to read in a single read operation, this is typically the
size of `audioData`.
Drain the recording stream of any existing data by reading from it until it ' s empty . This is usually run to clear out any stale data before performing an actual read operation thereby obtaining the most recently recorded data and the best possbile recording latency . @param audioData A buffer which the existing data can be read into @param numFrames The number of frames to read in a single read operation this is typically the size of ` audioData ` .
void VsAndroidCapture::drainRecordingStream(void *audioData, int32_t numFrames) {
  aaudio_result_t clearedFrames = 0;
  do {
    clearedFrames = AAudioStream_read(recordingStream_, audioData, numFrames, 0);
  } while (clearedFrames > 0);
}
void VsAndroidCapture :: drainRecordingStream ( void * audioData , int32_t numFrames ) { aaudio_result_t clearedFrames = 0 ; do { clearedFrames = AAudioStream_read ( recordingStream_ , audioData , numFrames , 0 ) ; } while ( clearedFrames > 0 ) ; }
Drain the recording stream of any existing data by reading from it until it's empty.
Drain the recording stream of any existing data by reading from it until it ' s empty .