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

Unified Diff: third_party/WebKit/Source/platform/audio/StereoPanner.h

Issue 2272683003: Remove redundant definition of Spatializer abstract class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix reference URL Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
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..953ec0db14362f9098034ebb1c5c2ee4e5b04911 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:
+// https://webaudio.github.io/web-audio-api/#Spatialzation-equal-power-panning
- 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;
« no previous file with comments | « third_party/WebKit/Source/platform/audio/Spatializer.cpp ('k') | third_party/WebKit/Source/platform/audio/StereoPanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698