Index: Source/platform/audio/StereoPanner.h |
diff --git a/LICENSE b/Source/platform/audio/StereoPanner.h |
similarity index 63% |
copy from LICENSE |
copy to Source/platform/audio/StereoPanner.h |
index 70bcb8ad118978579fa055f7ecc99604930900ce..85a5f7b467294c150ddc8fcd0a5997c6d0d9d3e4 100644 |
--- a/LICENSE |
+++ b/Source/platform/audio/StereoPanner.h |
@@ -1,8 +1,5 @@ |
// Copyright 2014 The Chromium Authors. All rights reserved. |
// |
-// The Chromium Authors can be found at |
-// http://src.chromium.org/svn/trunk/src/AUTHORS |
-// |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -28,3 +25,35 @@ |
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+ |
+#ifndef StereoPanner_h |
+#define StereoPanner_h |
+ |
+#include "platform/audio/Spatializer.h" |
+ |
+namespace blink { |
+ |
+// Common type of stereo panner as found in normal audio mixing equipment. |
+class PLATFORM_EXPORT StereoPanner final : public Spatializer { |
+public: |
+ StereoPanner(float sampleRate); |
+ |
+ virtual void panWithSampleAccurateValues(const AudioBus* inputBus, AudioBus* outputBuf, const float* panValues, size_t framesToProcess) override; |
+ virtual void panToTargetValue(const AudioBus* inputBus, AudioBus* outputBuf, float panValue, size_t framesToProcess) override; |
+ |
+ virtual void reset() override { } |
+ |
+ virtual double tailTime() const override { return 0; } |
+ virtual double latencyTime() const override { return 0; } |
+ |
+private: |
+ bool m_isFirstRender; |
+ double m_smoothingConstant; |
+ |
+ double m_gainL; |
+ double m_gainR; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // StereoPanner_h |