Commit 956d30cb authored by henrika's avatar henrika Committed by Commit bot

Fixes audio issue on Mac for USB headsets where...

Fixes audio issue on Mac for USB headsets where kAudioUnitErr_TooManyFramesToProcess can be returned for a few frames at startup.

BUG=466954
TEST=Manual tests of WebRTC clients and different USB headsets.

Review URL: https://codereview.chromium.org/1017683002

Cr-Commit-Position: refs/heads/master@{#320921}
parent ade207f5
...@@ -496,7 +496,14 @@ OSStatus AUAudioInputStream::InputProc(void* user_data, ...@@ -496,7 +496,14 @@ OSStatus AUAudioInputStream::InputProc(void* user_data,
if (result) { if (result) {
UMA_HISTOGRAM_SPARSE_SLOWLY("Media.AudioInputCbErrorMac", result); UMA_HISTOGRAM_SPARSE_SLOWLY("Media.AudioInputCbErrorMac", result);
OSSTATUS_DLOG(ERROR, result) << "AudioUnitRender() failed "; OSSTATUS_DLOG(ERROR, result) << "AudioUnitRender() failed ";
audio_input->HandleError(result); if (result != kAudioUnitErr_TooManyFramesToProcess) {
// We avoid stopping the stream for kAudioUnitErr_TooManyFramesToProcess
// since it has been observed that some USB headsets can cause this error
// but only for a few initial frames at startup and then then the stream
// returns to a stable state again.
// See b/19524368 for details.
audio_input->HandleError(result);
}
return result; return result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment