Chromium Code Reviews| 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..26132d079409eba7fa4393e918f754ddc04b3cda |
| --- /dev/null |
| +++ b/Source/platform/audio/Spatializer.cpp |
| @@ -0,0 +1,37 @@ |
| +// 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; |
| + |
| + // TODO: add the instantiation of BinauralPanner here. |
|
haraken
2014/11/13 02:08:27
TODO => FIXME
hongchan
2014/11/13 18:38:20
Actually I removed ENUM items for additional panne
|
| + // TODO: add the instantiation of SurroundPanner here. |
| + |
| + default: |
| + ASSERT_NOT_REACHED(); |
| + return nullptr; |
| + } |
| + |
| + return panner; |
| +} |
| + |
| +} // namespace blink |
| + |
| +#endif // ENABLE(WEB_AUDIO) |