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

Side by Side Diff: media/base/audio_splicer.h

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, 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 unified diff | Download patch
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 #ifndef MEDIA_BASE_AUDIO_SPLICER_H_ 5 #ifndef MEDIA_BASE_AUDIO_SPLICER_H_
6 #define MEDIA_BASE_AUDIO_SPLICER_H_ 6 #define MEDIA_BASE_AUDIO_SPLICER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 scoped_ptr<AudioBus> ExtractCrossfadeFromPreSplice( 78 scoped_ptr<AudioBus> ExtractCrossfadeFromPreSplice(
79 scoped_refptr<AudioBuffer>* crossfade_buffer); 79 scoped_refptr<AudioBuffer>* crossfade_buffer);
80 80
81 // Crossfades |pre_splice_bus->frames()| frames from 81 // Crossfades |pre_splice_bus->frames()| frames from
82 // |post_splice_sanitizer_| 82 // |post_splice_sanitizer_|
83 // with those from |pre_splice_bus|. Adds the crossfaded buffer to 83 // with those from |pre_splice_bus|. Adds the crossfaded buffer to
84 // |output_sanitizer_| along with all buffers in |post_splice_sanitizer_|. 84 // |output_sanitizer_| along with all buffers in |post_splice_sanitizer_|.
85 // 85 //
86 // |post_splice_sanitizer_| will be empty after this operation. 86 // |post_splice_sanitizer_| will be empty after this operation.
87 void CrossfadePostSplice(scoped_ptr<AudioBus> pre_splice_bus, 87 void CrossfadePostSplice(scoped_ptr<AudioBus> pre_splice_bus,
88 scoped_refptr<AudioBuffer> crossfade_buffer); 88 const scoped_refptr<AudioBuffer>& crossfade_buffer);
89 89
90 // Reset the splice and splice end timestamps. 90 // Reset the splice and splice end timestamps.
91 void reset_splice_timestamps() { 91 void reset_splice_timestamps() {
92 splice_timestamp_ = max_splice_end_timestamp_ = kNoTimestamp(); 92 splice_timestamp_ = max_splice_end_timestamp_ = kNoTimestamp();
93 } 93 }
94 94
95 const base::TimeDelta max_crossfade_duration_; 95 const base::TimeDelta max_crossfade_duration_;
96 base::TimeDelta splice_timestamp_; 96 base::TimeDelta splice_timestamp_;
97 base::TimeDelta max_splice_end_timestamp_; 97 base::TimeDelta max_splice_end_timestamp_;
98 98
(...skipping 16 matching lines...) Expand all
115 // Whether all buffers which should go into |pre_splice_sanitizer_| have been 115 // Whether all buffers which should go into |pre_splice_sanitizer_| have been
116 // received. If true, buffers should now be put in |post_splice_sanitizer_|. 116 // received. If true, buffers should now be put in |post_splice_sanitizer_|.
117 bool have_all_pre_splice_buffers_; 117 bool have_all_pre_splice_buffers_;
118 118
119 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSplicer); 119 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSplicer);
120 }; 120 };
121 121
122 } // namespace media 122 } // namespace media
123 123
124 #endif 124 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698