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

Unified Diff: content/renderer/media/media_stream_audio_processor.cc

Issue 308643004: changed MSAP to work with 96000KHZ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added unittest Created 6 years, 7 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 | content/renderer/media/media_stream_audio_processor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_audio_processor.cc
diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
index 460ab8baf4e653d6418f99735d229ab97cddd6b6..2c64d936c8c95a959a6f0a7bb8b8e63fb714aaa9 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -70,6 +70,13 @@ class MediaStreamAudioProcessor::MediaStreamAudioConverter
int buffer_size = std::max(
kMaxNumberOfBuffersInFifo * source_params_.frames_per_buffer(),
kMaxNumberOfBuffersInFifo * sink_params_.frames_per_buffer());
+
+ // Also, FIFO needs to have enough space to store pre-processed data
henrika (OOO until Aug 14) 2014/06/02 08:23:41 Is it possible to set the buffer size once only an
no longer working on chromium 2014/06/02 09:15:08 Yes, I added a max_frame_size as a temp variable t
+ // before passing the data to webrtc::AudioProcessing, which requires 10ms
+ // as packet size.
+ buffer_size = std::max(
+ buffer_size,
+ kMaxNumberOfBuffersInFifo * source_params_.sample_rate() / 100);
fifo_.reset(new media::AudioFifo(source_params_.channels(), buffer_size));
// TODO(xians): Use CreateWrapper to save one memcpy.
audio_wrapper_ = media::AudioBus::Create(sink_params_.channels(),
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698