Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: Source/modules/webaudio/AudioBufferSourceNode.cpp

Issue 190973010: Remove unnecessary attribute "gain" in AudioBuffer and AudioBufferSourceNode interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Combine with removing gains from AudioBuffer and AudioBufferSourceNode Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.h ('k') | Source/modules/webaudio/AudioBufferSourceNode.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.h ('k') | Source/modules/webaudio/AudioBufferSourceNode.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698