Loading media/libaaudio/src/client/AudioStreamInternal.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,12 @@ aaudio_result_t AudioStreamInternal::open(const AudioStreamBuilder &builder) { request.getConfiguration().setInputPreset(getInputPreset()); request.getConfiguration().setPrivacySensitive(isPrivacySensitive()); request.getConfiguration().setBufferCapacity(builder.getBufferCapacity()); // When sample rate conversion is needed, we use the device sample rate instead of the // requested sample rate to scale the capacity in configureDataInformation(). // Thus, we should scale the capacity here to cancel out the (sampleRate / deviceSampleRate) // scaling there. request.getConfiguration().setBufferCapacity(builder.getBufferCapacity() * 48000 / getSampleRate()); mServiceStreamHandleInfo = mServiceInterface.openStream(request, configurationOutput); if (getServiceHandle() < 0 Loading Loading
media/libaaudio/src/client/AudioStreamInternal.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,12 @@ aaudio_result_t AudioStreamInternal::open(const AudioStreamBuilder &builder) { request.getConfiguration().setInputPreset(getInputPreset()); request.getConfiguration().setPrivacySensitive(isPrivacySensitive()); request.getConfiguration().setBufferCapacity(builder.getBufferCapacity()); // When sample rate conversion is needed, we use the device sample rate instead of the // requested sample rate to scale the capacity in configureDataInformation(). // Thus, we should scale the capacity here to cancel out the (sampleRate / deviceSampleRate) // scaling there. request.getConfiguration().setBufferCapacity(builder.getBufferCapacity() * 48000 / getSampleRate()); mServiceStreamHandleInfo = mServiceInterface.openStream(request, configurationOutput); if (getServiceHandle() < 0 Loading