Index: Source/platform/audio/Spatializer.cpp |
diff --git a/LICENSE b/Source/platform/audio/Spatializer.cpp |
similarity index 71% |
copy from LICENSE |
copy to Source/platform/audio/Spatializer.cpp |
index 70bcb8ad118978579fa055f7ecc99604930900ce..fe7996fea6ba77b53ddd9700f0c6443f92027e48 100644 |
--- a/LICENSE |
+++ b/Source/platform/audio/Spatializer.cpp |
@@ -1,8 +1,5 @@ |
// Copyright 2014 The Chromium Authors. All rights reserved. |
// |
-// The Chromium Authors can be found at |
-// http://src.chromium.org/svn/trunk/src/AUTHORS |
-// |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -28,3 +25,37 @@ |
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+ |
+#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; |
+ |
+ // TODO: add the instantiation of BinauralPanner here. |
+ // TODO: add the instantiation of SurroundPanner here. |
+ |
+ default: |
+ ASSERT_NOT_REACHED(); |
+ return nullptr; |
+ } |
+ |
+ return panner; |
+} |
+ |
+} // namespace blink |
+ |
+#endif // ENABLE(WEB_AUDIO) |