Chromium Code Reviews| Index: Source/modules/webaudio/AudioBufferSourceNode.cpp |
| diff --git a/Source/modules/webaudio/AudioBufferSourceNode.cpp b/Source/modules/webaudio/AudioBufferSourceNode.cpp |
| index e7257bfc62a98a5608bec9cc0f436c5f783f4ee5..90408b8abab3310cb1a0ee19aa60d756f5c09ff0 100644 |
| --- a/Source/modules/webaudio/AudioBufferSourceNode.cpp |
| +++ b/Source/modules/webaudio/AudioBufferSourceNode.cpp |
| @@ -65,13 +65,11 @@ AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* context, float sample |
| , m_isGrain(false) |
| , m_grainOffset(0.0) |
| , m_grainDuration(DefaultGrainDuration) |
| - , m_lastGain(1.0) |
| , m_pannerNode(0) |
| { |
| ScriptWrappable::init(this); |
| setNodeType(NodeTypeAudioBufferSource); |
| - m_gain = AudioParam::create(context, "gain", 1.0, 0.0, 1.0); |
| m_playbackRate = AudioParam::create(context, "playbackRate", 1.0, 0.0, MaxRate); |
| // Default to mono. A call to setBuffer() will set the number of output channels to that of the buffer. |
| @@ -133,9 +131,6 @@ void AudioBufferSourceNode::process(size_t framesToProcess) |
| return; |
| } |
| - // Apply the gain (in-place) to the output bus. |
| - float totalGain = gain()->value() * m_buffer->gain(); |
| - outputBus->copyWithGainFrom(*outputBus, &m_lastGain, totalGain); |
|
Raymond Toy
2014/04/07 20:17:12
Do we still need to do some kind of copy here or d
KhNo
2014/04/08 02:27:16
It is just for applying gain to outputBus itself.
|
| outputBus->clearSilentFlag(); |
| } else { |
| // Too bad - the tryLock() failed. We must be in the middle of changing buffers and were already outputting silence anyway. |