sample/vs_android.cc
/**
 * Close the stream. After the stream is closed it is deleted and subesequent AAudioStream_* calls
 * will return an error. AAudioStream_close() also checks and waits for any outstanding dataCallback
 * calls to complete before closing the stream. This means the application does not need to add
 * synchronization between the dataCallback function and the thread calling AAudioStream_close()
 * [the closing thread is the UI thread in this sample].
 * @param stream the stream to close
 */
Close the stream. After the stream is closed it is deleted and subesequent AAudioStream_* calls
will return an error. AAudioStream_close() also checks and waits for any outstanding dataCallback
calls to complete before closing the stream. This means the application does not need to add
synchronization between the dataCallback function and the thread calling AAudioStream_close()
[the closing thread is the UI thread in this sample].
@param stream the stream to close
Close the stream . After the stream is closed it is deleted and subesequent AAudioStream_ * calls will return an error . AAudioStream_close () also checks and waits for any outstanding dataCallback calls to complete before closing the stream . This means the application does not need to add synchronization between the dataCallback function and the thread calling AAudioStream_close () [ the closing thread is the UI thread in this sample ] . @param stream the stream to close
void VsAndroidCapture::closeStream(AAudioStream *stream) {
  if (stream != nullptr) {
    aaudio_result_t result = AAudioStream_close(stream);
    if (result != AAUDIO_OK) {
      LOGE("Error closing stream. %s", AAudio_convertResultToText(result));
    }
  }
}
void VsAndroidCapture :: closeStream ( AAudioStream * stream ) { if ( stream != nullptr ) { aaudio_result_t result = AAudioStream_close ( stream ) ; if ( result != AAUDIO_OK ) { LOGE ( " " , AAudio_convertResultToText ( result ) ) ; } } }
Close the stream.
Close the stream .