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

Unified Diff: media/base/audio_splicer.cc

Issue 602193003: Cleanup some audio classes with C++11 shine! (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« media/base/audio_renderer_mixer.cc ('K') | « media/base/audio_splicer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_splicer.cc
diff --git a/media/base/audio_splicer.cc b/media/base/audio_splicer.cc
index c8e0d4dd120c6a80023f10e46a539d179b7e7ade..9424b0b39d602a601587182e6cff755a18dfa069 100644
--- a/media/base/audio_splicer.cc
+++ b/media/base/audio_splicer.cc
@@ -214,10 +214,8 @@ void AudioStreamSanitizer::AddOutputBuffer(
int AudioStreamSanitizer::GetFrameCount() const {
int frame_count = 0;
- for (BufferQueue::const_iterator it = output_buffers_.begin();
- it != output_buffers_.end(); ++it) {
- frame_count += (*it)->frame_count();
- }
+ for (const auto& buffer : output_buffers_)
wolenetz 2014/09/26 01:22:31 aside ditto: (rietveld lint C++11 bug...) "Storage
+ frame_count += buffer->frame_count();
return frame_count;
}
@@ -451,7 +449,7 @@ scoped_ptr<AudioBus> AudioSplicer::ExtractCrossfadeFromPreSplice(
void AudioSplicer::CrossfadePostSplice(
scoped_ptr<AudioBus> pre_splice_bus,
- scoped_refptr<AudioBuffer> crossfade_buffer) {
+ const scoped_refptr<AudioBuffer>& crossfade_buffer) {
// Use the calculated timestamp and duration to ensure there's no extra gaps
// or overlaps to process when adding the buffer to |output_sanitizer_|.
const AudioTimestampHelper& output_ts_helper =
« media/base/audio_renderer_mixer.cc ('K') | « media/base/audio_splicer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698