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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/GainNode.cpp

Issue 2440583002: Use AudioUtilities::kRenderQuantumFrames everywhere (Closed)
Patch Set: Address review comments Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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 19 matching lines...) Expand all
30 #include "platform/audio/AudioBus.h" 30 #include "platform/audio/AudioBus.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 GainHandler::GainHandler(AudioNode& node, 34 GainHandler::GainHandler(AudioNode& node,
35 float sampleRate, 35 float sampleRate,
36 AudioParamHandler& gain) 36 AudioParamHandler& gain)
37 : AudioHandler(NodeTypeGain, node, sampleRate), 37 : AudioHandler(NodeTypeGain, node, sampleRate),
38 m_lastGain(1.0), 38 m_lastGain(1.0),
39 m_gain(gain), 39 m_gain(gain),
40 m_sampleAccurateGainValues(ProcessingSizeInFrames) // FIXME: can probably 40 m_sampleAccurateGainValues(
41 // share temp buffer 41 AudioUtilities::kRenderQuantumFrames) // FIXME: can probably
42 // in context 42 // share temp buffer
43 // in context
43 { 44 {
44 addInput(); 45 addInput();
45 addOutput(1); 46 addOutput(1);
46 47
47 initialize(); 48 initialize();
48 } 49 }
49 50
50 PassRefPtr<GainHandler> GainHandler::create(AudioNode& node, 51 PassRefPtr<GainHandler> GainHandler::create(AudioNode& node,
51 float sampleRate, 52 float sampleRate,
52 AudioParamHandler& gain) { 53 AudioParamHandler& gain) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 AudioParam* GainNode::gain() const { 168 AudioParam* GainNode::gain() const {
168 return m_gain; 169 return m_gain;
169 } 170 }
170 171
171 DEFINE_TRACE(GainNode) { 172 DEFINE_TRACE(GainNode) {
172 visitor->trace(m_gain); 173 visitor->trace(m_gain);
173 AudioNode::trace(visitor); 174 AudioNode::trace(visitor);
174 } 175 }
175 176
176 } // namespace blink 177 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698