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) |