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

Side by Side Diff: third_party/WebKit/Source/platform/audio/StereoPanner.cpp

Issue 2795943002: Rewrite references to "wtf/" to "platform/wtf/" in platform/audio. (Closed)
Patch Set: Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "platform/audio/StereoPanner.h" 5 #include "platform/audio/StereoPanner.h"
6
7 #include <algorithm>
6 #include "platform/audio/AudioBus.h" 8 #include "platform/audio/AudioBus.h"
7 #include "platform/audio/AudioUtilities.h" 9 #include "platform/audio/AudioUtilities.h"
8 #include "wtf/MathExtras.h" 10 #include "platform/wtf/MathExtras.h"
9 #include <algorithm>
10 11
11 // Use a 50ms smoothing / de-zippering time-constant. 12 // Use a 50ms smoothing / de-zippering time-constant.
12 const float SmoothingTimeConstant = 0.050f; 13 const float SmoothingTimeConstant = 0.050f;
13 14
14 namespace blink { 15 namespace blink {
15 16
16 // Implement equal-power panning algorithm for mono or stereo input. 17 // Implement equal-power panning algorithm for mono or stereo input.
17 // See: http://webaudio.github.io/web-audio-api/#panning-algorithm 18 // See: http://webaudio.github.io/web-audio-api/#panning-algorithm
18 19
19 std::unique_ptr<StereoPanner> StereoPanner::create(float sampleRate) { 20 std::unique_ptr<StereoPanner> StereoPanner::create(float sampleRate) {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // When [0; 1], keep right channel intact and equal-power pan the 173 // When [0; 1], keep right channel intact and equal-power pan the
173 // left channel only. 174 // left channel only.
174 *destinationL++ = static_cast<float>(inputL * gainL); 175 *destinationL++ = static_cast<float>(inputL * gainL);
175 *destinationR++ = static_cast<float>(inputR + inputL * gainR); 176 *destinationR++ = static_cast<float>(inputR + inputL * gainR);
176 } 177 }
177 } 178 }
178 } 179 }
179 } 180 }
180 181
181 } // namespace blink 182 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/audio/StereoPanner.h ('k') | third_party/WebKit/Source/platform/audio/UpSampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698