Chromium Code Reviews| 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..a892fe2f7f51bfb11a9d03e4f2d560e1b307477b 100644 |
| --- a/third_party/WebKit/Source/platform/audio/StereoPanner.h |
| +++ b/third_party/WebKit/Source/platform/audio/StereoPanner.h |
| @@ -5,26 +5,32 @@ |
| #ifndef StereoPanner_h |
| #define StereoPanner_h |
| -#include "platform/audio/Spatializer.h" |
| +#include "platform/PlatformExport.h" |
| +#include "wtf/Allocator.h" |
| +#include "wtf/Noncopyable.h" |
| +#include <memory> |
|
Raymond Toy
2016/08/24 18:30:29
Is including memory needed here? Is it for USING_
hongchan
2016/08/24 21:52:33
Done.
|
| 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 |
| - 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; |