sample/vs_android.cc
/**
 * Set the stream parameters which are common to both recording and playback streams.
 * @param builder The playback or recording stream builder
 */
Set the stream parameters which are common to both recording and playback streams.
@param builder The playback or recording stream builder
Set the stream parameters which are common to both recording and playback streams . @param builder The playback or recording stream builder
void VsAndroidCapture::setupCommonStreamParameters(AAudioStreamBuilder *builder) {
  AAudioStreamBuilder_setFormat(builder, format_);
  AAudioStreamBuilder_setSharingMode(builder, AAUDIO_SHARING_MODE_EXCLUSIVE);
  AAudioStreamBuilder_setPerformanceMode(builder, AAUDIO_PERFORMANCE_MODE_LOW_LATENCY);
  AAudioStreamBuilder_setErrorCallback(builder, ::errorCallback, this);
}
void VsAndroidCapture :: setupCommonStreamParameters ( AAudioStreamBuilder * builder ) { AAudioStreamBuilder_setFormat ( builder , format_ ) ; AAudioStreamBuilder_setSharingMode ( builder , AAUDIO_SHARING_MODE_EXCLUSIVE ) ; AAudioStreamBuilder_setPerformanceMode ( builder , AAUDIO_PERFORMANCE_MODE_LOW_LATENCY ) ; AAudioStreamBuilder_setErrorCallback ( builder , :: errorCallback , this ) ; }
Set the stream parameters which are common to both recording and playback streams.
Set the stream parameters which are common to both recording and playback streams .
// We request EXCLUSIVE mode since this will give us the lowest possible latency. // If EXCLUSIVE mode isn't available the builder will fall back to SHARED mode.