OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "config.h" | |
6 | |
7 #if ENABLE(WEB_AUDIO) | |
8 | |
9 #include "platform/audio/Spatializer.h" | |
10 | |
11 #include "platform/audio/StereoPanner.h" | |
12 | |
13 namespace blink { | |
14 | |
15 Spatializer* Spatializer::create(PanningModel model, float sampleRate) | |
16 { | |
17 Spatializer* panner; | |
18 | |
19 switch (model) { | |
20 case PanningModelEqualPower: | |
21 panner = new StereoPanner(sampleRate); | |
22 break; | |
23 | |
24 // 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
| |
25 // TODO: add the instantiation of SurroundPanner here. | |
26 | |
27 default: | |
28 ASSERT_NOT_REACHED(); | |
29 return nullptr; | |
30 } | |
31 | |
32 return panner; | |
33 } | |
34 | |
35 } // namespace blink | |
36 | |
37 #endif // ENABLE(WEB_AUDIO) | |
OLD | NEW |