OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "modules/webaudio/PannerNode.h" | 29 #include "modules/webaudio/PannerNode.h" |
30 | 30 |
31 #include "core/dom/ExecutionContext.h" | 31 #include "core/dom/ExecutionContext.h" |
32 #include "platform/audio/HRTFPanner.h" | 32 #include "platform/audio/HRTFPanner.h" |
33 #include "modules/webaudio/AudioBufferSourceNode.h" | 33 #include "modules/webaudio/AudioBufferSourceNode.h" |
34 #include "modules/webaudio/AudioContext.h" | 34 #include "modules/webaudio/AudioContext.h" |
35 #include "modules/webaudio/AudioNodeInput.h" | 35 #include "modules/webaudio/AudioNodeInput.h" |
36 #include "modules/webaudio/AudioNodeOutput.h" | 36 #include "modules/webaudio/AudioNodeOutput.h" |
37 #include "wtf/MathExtras.h" | 37 #include "wtf/MathExtras.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace blink { |
40 | 40 |
41 static void fixNANs(double &x) | 41 static void fixNANs(double &x) |
42 { | 42 { |
43 if (std::isnan(x) || std::isinf(x)) | 43 if (std::isnan(x) || std::isinf(x)) |
44 x = 0.0; | 44 x = 0.0; |
45 } | 45 } |
46 | 46 |
47 PannerNode::PannerNode(AudioContext* context, float sampleRate) | 47 PannerNode::PannerNode(AudioContext* context, float sampleRate) |
48 : AudioNode(context, sampleRate) | 48 : AudioNode(context, sampleRate) |
49 , m_panningModel(Panner::PanningModelHRTF) | 49 , m_panningModel(Panner::PanningModelHRTF) |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 // mark it as visited and recurse through the node looking for s
ources. | 568 // mark it as visited and recurse through the node looking for s
ources. |
569 if (iterator == visitedNodes.end()) { | 569 if (iterator == visitedNodes.end()) { |
570 visitedNodes.set(connectedNode, true); | 570 visitedNodes.set(connectedNode, true); |
571 notifyAudioSourcesConnectedToNode(connectedNode, visitedNode
s); // recurse | 571 notifyAudioSourcesConnectedToNode(connectedNode, visitedNode
s); // recurse |
572 } | 572 } |
573 } | 573 } |
574 } | 574 } |
575 } | 575 } |
576 } | 576 } |
577 | 577 |
578 } // namespace WebCore | 578 } // namespace blink |
579 | 579 |
580 #endif // ENABLE(WEB_AUDIO) | 580 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |