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

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

Issue 156783003: Enhance AudioSplicer to crossfade marked splice frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/base/audio_timestamp_helper.h ('k') | media/base/vector_math.cc » ('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 #ifndef MEDIA_BASE_VECTOR_MATH_H_ 5 #ifndef MEDIA_BASE_VECTOR_MATH_H_
6 #define MEDIA_BASE_VECTOR_MATH_H_ 6 #define MEDIA_BASE_VECTOR_MATH_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
(...skipping 20 matching lines...) Expand all
31 // Computes the exponentially-weighted moving average power of a signal by 31 // Computes the exponentially-weighted moving average power of a signal by
32 // iterating the recurrence: 32 // iterating the recurrence:
33 // 33 //
34 // y[-1] = initial_value 34 // y[-1] = initial_value
35 // y[n] = smoothing_factor * src[n]^2 + (1-smoothing_factor) * y[n-1] 35 // y[n] = smoothing_factor * src[n]^2 + (1-smoothing_factor) * y[n-1]
36 // 36 //
37 // Returns the final average power and the maximum squared element value. 37 // Returns the final average power and the maximum squared element value.
38 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower( 38 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower(
39 float initial_value, const float src[], int len, float smoothing_factor); 39 float initial_value, const float src[], int len, float smoothing_factor);
40 40
41 MEDIA_EXPORT void Crossfade(const float src[], int len, float dest[]);
42
41 } // namespace vector_math 43 } // namespace vector_math
42 } // namespace media 44 } // namespace media
43 45
44 #endif // MEDIA_BASE_VECTOR_MATH_H_ 46 #endif // MEDIA_BASE_VECTOR_MATH_H_
OLDNEW
« no previous file with comments | « media/base/audio_timestamp_helper.h ('k') | media/base/vector_math.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698