OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012, Intel Corporation. All rights reserved. | 2 * Copyright (C) 2012, Intel Corporation. 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 14 matching lines...) Expand all Loading... |
25 #include "config.h" | 25 #include "config.h" |
26 | 26 |
27 #if ENABLE(WEB_AUDIO) | 27 #if ENABLE(WEB_AUDIO) |
28 | 28 |
29 #include "modules/webaudio/AudioBasicInspectorNode.h" | 29 #include "modules/webaudio/AudioBasicInspectorNode.h" |
30 | 30 |
31 #include "modules/webaudio/AudioContext.h" | 31 #include "modules/webaudio/AudioContext.h" |
32 #include "modules/webaudio/AudioNodeInput.h" | 32 #include "modules/webaudio/AudioNodeInput.h" |
33 #include "modules/webaudio/AudioNodeOutput.h" | 33 #include "modules/webaudio/AudioNodeOutput.h" |
34 | 34 |
35 namespace WebCore { | 35 namespace blink { |
36 | 36 |
37 AudioBasicInspectorNode::AudioBasicInspectorNode(AudioContext* context, float sa
mpleRate, unsigned outputChannelCount) | 37 AudioBasicInspectorNode::AudioBasicInspectorNode(AudioContext* context, float sa
mpleRate, unsigned outputChannelCount) |
38 : AudioNode(context, sampleRate) | 38 : AudioNode(context, sampleRate) |
39 , m_needAutomaticPull(false) | 39 , m_needAutomaticPull(false) |
40 { | 40 { |
41 addInput(); | 41 addInput(); |
42 addOutput(AudioNodeOutput::create(this, outputChannelCount)); | 42 addOutput(AudioNodeOutput::create(this, outputChannelCount)); |
43 } | 43 } |
44 | 44 |
45 // We override pullInputs() as an optimization allowing this node to take advant
age of in-place processing, | 45 // We override pullInputs() as an optimization allowing this node to take advant
age of in-place processing, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 context()->addAutomaticPullNode(this); | 110 context()->addAutomaticPullNode(this); |
111 m_needAutomaticPull = true; | 111 m_needAutomaticPull = true; |
112 } else if (!numberOfInputConnections && m_needAutomaticPull) { | 112 } else if (!numberOfInputConnections && m_needAutomaticPull) { |
113 // The AudioBasicInspectorNode is connected to nothing, remove it fr
om the context's automatic pull list. | 113 // The AudioBasicInspectorNode is connected to nothing, remove it fr
om the context's automatic pull list. |
114 context()->removeAutomaticPullNode(this); | 114 context()->removeAutomaticPullNode(this); |
115 m_needAutomaticPull = false; | 115 m_needAutomaticPull = false; |
116 } | 116 } |
117 } | 117 } |
118 } | 118 } |
119 | 119 |
120 } // namespace WebCore | 120 } // namespace blink |
121 | 121 |
122 #endif // ENABLE(WEB_AUDIO) | 122 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |