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 21 matching lines...) Expand all Loading... |
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 blink { | 35 namespace blink { |
36 | 36 |
37 GainNode::GainNode(AudioContext* context, float sampleRate) | 37 GainNode::GainNode(AudioContext* context, float sampleRate) |
38 : AudioNode(context, sampleRate) | 38 : AudioNode(context, sampleRate) |
39 , m_lastGain(1.0) | 39 , m_lastGain(1.0) |
40 , m_sampleAccurateGainValues(AudioNode::ProcessingSizeInFrames) // FIXME: ca
n probably share temp buffer in context | 40 , m_sampleAccurateGainValues(AudioNode::ProcessingSizeInFrames) // FIXME: ca
n probably share temp buffer in context |
41 { | 41 { |
42 ScriptWrappable::init(this); | |
43 m_gain = AudioParam::create(context, 1.0); | 42 m_gain = AudioParam::create(context, 1.0); |
44 | 43 |
45 addInput(); | 44 addInput(); |
46 addOutput(AudioNodeOutput::create(this, 1)); | 45 addOutput(AudioNodeOutput::create(this, 1)); |
47 | 46 |
48 setNodeType(NodeTypeGain); | 47 setNodeType(NodeTypeGain); |
49 | 48 |
50 initialize(); | 49 initialize(); |
51 } | 50 } |
52 | 51 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 109 |
111 void GainNode::trace(Visitor* visitor) | 110 void GainNode::trace(Visitor* visitor) |
112 { | 111 { |
113 visitor->trace(m_gain); | 112 visitor->trace(m_gain); |
114 AudioNode::trace(visitor); | 113 AudioNode::trace(visitor); |
115 } | 114 } |
116 | 115 |
117 } // namespace blink | 116 } // namespace blink |
118 | 117 |
119 #endif // ENABLE(WEB_AUDIO) | 118 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |