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

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

Issue 1557363002: Remove the WEB_AUDIO compile time flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 #if ENABLE(WEB_AUDIO)
8 #include "platform/audio/AudioBus.h" 6 #include "platform/audio/AudioBus.h"
9 #include "platform/audio/AudioUtilities.h" 7 #include "platform/audio/AudioUtilities.h"
10 #include "wtf/MathExtras.h" 8 #include "wtf/MathExtras.h"
11 #include <algorithm> 9 #include <algorithm>
12 10
13 // Use a 50ms smoothing / de-zippering time-constant. 11 // Use a 50ms smoothing / de-zippering time-constant.
14 const float SmoothingTimeConstant = 0.050f; 12 const float SmoothingTimeConstant = 0.050f;
15 13
16 namespace blink { 14 namespace blink {
17 15
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // left channel only. 162 // left channel only.
165 *destinationL++ = static_cast<float>(inputL * gainL); 163 *destinationL++ = static_cast<float>(inputL * gainL);
166 *destinationR++ = static_cast<float>(inputR + inputL * gainR); 164 *destinationR++ = static_cast<float>(inputR + inputL * gainR);
167 } 165 }
168 } 166 }
169 } 167 }
170 } 168 }
171 169
172 } // namespace blink 170 } // namespace blink
173 171
174 #endif // ENABLE(WEB_AUDIO)
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