Index: third_party/WebKit/Source/platform/audio/StereoPanner.h |
diff --git a/third_party/WebKit/Source/platform/audio/StereoPanner.h b/third_party/WebKit/Source/platform/audio/StereoPanner.h |
index 14b9caefe28b8d7bcf927705835781f8bf73f119..1ba05541ec2d9d40ad58fc988743e2e87ba32590 100644 |
--- a/third_party/WebKit/Source/platform/audio/StereoPanner.h |
+++ b/third_party/WebKit/Source/platform/audio/StereoPanner.h |
@@ -5,26 +5,31 @@ |
#ifndef StereoPanner_h |
#define StereoPanner_h |
-#include "platform/audio/Spatializer.h" |
+#include "platform/PlatformExport.h" |
+#include "wtf/Allocator.h" |
+#include "wtf/Noncopyable.h" |
namespace blink { |
-// Common type of stereo panner as found in normal audio mixing equipment. |
-// See: http://webaudio.github.io/web-audio-api/#the-stereopannernode-interface |
+class AudioBus; |
-class PLATFORM_EXPORT StereoPanner final : public Spatializer { |
-public: |
- explicit StereoPanner(float sampleRate); |
+// Implement the equal-power panning algorithm for mono or stereo input. See: |
+// http://webaudio.github.io/web-audio-api/#panning-algorithm |
Raymond Toy
2016/08/24 22:21:25
Nit: this link is broken. I think you want https:/
|
- void panWithSampleAccurateValues(const AudioBus* inputBus, AudioBus* outputBuf, const float* panValues, size_t framesToProcess) override; |
- void panToTargetValue(const AudioBus* inputBus, AudioBus* outputBuf, float panValue, size_t framesToProcess) override; |
+class PLATFORM_EXPORT StereoPanner { |
+ USING_FAST_MALLOC(StereoPanner); |
+ WTF_MAKE_NONCOPYABLE(StereoPanner); |
- void reset() override { } |
+public: |
+ static std::unique_ptr<StereoPanner> create(float sampleRate); |
+ ~StereoPanner() { }; |
- double tailTime() const override { return 0; } |
- double latencyTime() const override { return 0; } |
+ void panWithSampleAccurateValues(const AudioBus* inputBus, AudioBus* outputBus, const float* panValues, size_t framesToProcess); |
+ void panToTargetValue(const AudioBus* inputBus, AudioBus* outputBus, float panValue, size_t framesToProcess); |
private: |
+ explicit StereoPanner(float sampleRate); |
+ |
bool m_isFirstRender; |
double m_smoothingConstant; |