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

Unified Diff: Source/platform/audio/Spatializer.cpp

Issue 691143007: Implement StereoPannerNode for robust stereo panning (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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: Source/platform/audio/Spatializer.cpp
diff --git a/Source/platform/audio/Spatializer.cpp b/Source/platform/audio/Spatializer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3f470bd1bde6e620554d1bd398617915eb9de8e3
--- /dev/null
+++ b/Source/platform/audio/Spatializer.cpp
@@ -0,0 +1,33 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "platform/audio/Spatializer.h"
+
+#include "platform/audio/StereoPanner.h"
+
+namespace blink {
+
+Spatializer* Spatializer::create(PanningModel model, float sampleRate)
+{
+ Spatializer* panner;
+
+ switch (model) {
+ case PanningModelEqualPower:
+ panner = new StereoPanner(sampleRate);
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ return nullptr;
+ }
+
+ return panner;
+}
+
+} // namespace blink
+
+#endif // ENABLE(WEB_AUDIO)

Powered by Google App Engine
This is Rietveld 408576698