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

Side by Side Diff: media/base/audio_converter.cc

Issue 15394003: Remove extra memcpys from AudioPullFifo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix includes. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/webrtc_local_audio_renderer.cc ('k') | media/base/audio_pull_fifo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // AudioConverter implementation. Uses MultiChannelSincResampler for resampling 5 // AudioConverter implementation. Uses MultiChannelSincResampler for resampling
6 // audio, ChannelMixer for channel mixing, and AudioPullFifo for buffering. 6 // audio, ChannelMixer for channel mixing, and AudioPullFifo for buffering.
7 // 7 //
8 // Delay estimates are provided to InputCallbacks based on the frame delay 8 // Delay estimates are provided to InputCallbacks based on the frame delay
9 // information reported via the resampler and FIFO units. 9 // information reported via the resampler and FIFO units.
10 10
11 #include "media/base/audio_converter.h" 11 #include "media/base/audio_converter.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 14
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/bind_helpers.h" 16 #include "base/bind_helpers.h"
17 #include "media/base/audio_bus.h"
17 #include "media/base/audio_pull_fifo.h" 18 #include "media/base/audio_pull_fifo.h"
18 #include "media/base/channel_mixer.h" 19 #include "media/base/channel_mixer.h"
19 #include "media/base/multi_channel_resampler.h" 20 #include "media/base/multi_channel_resampler.h"
20 #include "media/base/vector_math.h" 21 #include "media/base/vector_math.h"
21 22
22 namespace media { 23 namespace media {
23 24
24 AudioConverter::AudioConverter(const AudioParameters& input_params, 25 AudioConverter::AudioConverter(const AudioParameters& input_params,
25 const AudioParameters& output_params, 26 const AudioParameters& output_params,
26 bool disable_fifo) 27 bool disable_fifo)
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 239
239 void AudioConverter::ProvideInput(int resampler_frame_delay, AudioBus* dest) { 240 void AudioConverter::ProvideInput(int resampler_frame_delay, AudioBus* dest) {
240 resampler_frame_delay_ = resampler_frame_delay; 241 resampler_frame_delay_ = resampler_frame_delay;
241 if (audio_fifo_) 242 if (audio_fifo_)
242 audio_fifo_->Consume(dest, dest->frames()); 243 audio_fifo_->Consume(dest, dest->frames());
243 else 244 else
244 SourceCallback(0, dest); 245 SourceCallback(0, dest);
245 } 246 }
246 247
247 } // namespace media 248 } // namespace media
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_local_audio_renderer.cc ('k') | media/base/audio_pull_fifo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698