Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: media/audio/mac/audio_low_latency_input_mac.cc

Issue 1017683002: Fixes audio issue on Mac for USB headsets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_low_latency_input_mac.cc
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
index 4d8de904654aef911933ade5629d520e871b7def..1894ead7dcd30d875d09605b9e053fd0f023aec9 100644
--- a/media/audio/mac/audio_low_latency_input_mac.cc
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
@@ -496,7 +496,14 @@ OSStatus AUAudioInputStream::InputProc(void* user_data,
if (result) {
UMA_HISTOGRAM_SPARSE_SLOWLY("Media.AudioInputCbErrorMac", result);
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
DaleCurtis 2015/03/18 22:09:06 Since you explicitly mention that this returns to
no longer working on chromium 2015/03/18 22:15:01 It is a bit hard to define the threshold since it
+ // returns to a stable state again.
+ // See b/19524368 for details.
+ audio_input->HandleError(result);
+ }
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698