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

Unified Diff: components/audio_modem/audio_recorder_impl.cc

Issue 1020683002: Fixing mono/stereo crash (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 | components/audio_modem/constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/audio_modem/audio_recorder_impl.cc
diff --git a/components/audio_modem/audio_recorder_impl.cc b/components/audio_modem/audio_recorder_impl.cc
index b694c3974cc3ce749339328e34e93716c8d33a1a..634380f9837477260f5d8f315dafdc7884c5281e 100644
--- a/components/audio_modem/audio_recorder_impl.cc
+++ b/components/audio_modem/audio_recorder_impl.cc
@@ -175,7 +175,7 @@ void AudioRecorderImpl::OnData(media::AudioInputStream* stream,
// Buffer full, send it for processing.
if (buffer_->frames() == buffer_frame_index_) {
ProcessSamples(buffer_.Pass(), decode_callback_);
- buffer_ = media::AudioBus::Create(kDefaultChannels, total_buffer_frames_);
+ buffer_ = media::AudioBus::Create(source->channels(), total_buffer_frames_);
buffer_frame_index_ = 0;
// Copy any remaining frames in the source to our buffer.
« no previous file with comments | « no previous file | components/audio_modem/constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698