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

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

Issue 11143011: Removed CHECK to avoid browser crash for Mac OS X. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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_output_mac.cc
diff --git a/media/audio/mac/audio_low_latency_output_mac.cc b/media/audio/mac/audio_low_latency_output_mac.cc
index 8faa67f7224d0e9f6a4aad5771bb7a8d26af77d9..ebf33e56ff41ae227a872953e60fa9992d7a0a76 100644
--- a/media/audio/mac/audio_low_latency_output_mac.cc
+++ b/media/audio/mac/audio_low_latency_output_mac.cc
@@ -256,9 +256,13 @@ OSStatus AUAudioOutputStream::Render(UInt32 number_of_frames,
// size set by kAudioDevicePropertyBufferFrameSize above on a per process
// basis. What this means is that the |number_of_frames| value may be larger
// or smaller than the value set during Configure(). In this case either
- // audio input or audio output will be broken.
- // See http://crbug.com/154352 for details.
- CHECK_EQ(number_of_frames, static_cast<UInt32>(audio_bus_->frames()));
+ // audio input or audio output will be broken, so just output silence.
+ // TODO(crogers): Figure out what can trigger a change in |number_of_frames|.
+ // See http://crbug.com/1543 for details.
+ if (number_of_frames != static_cast<UInt32>(audio_bus_->frames())) {
+ memset(audio_data, 0, number_of_frames * format_.mBytesPerFrame);
+ return noErr;
+ }
int frames_filled = source_->OnMoreData(
audio_bus_.get(), AudioBuffersState(0, hardware_pending_bytes));
« 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