| OLD | NEW |
| 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 Loading... |
| 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) | |
| OLD | NEW |