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

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

Issue 2103043007: Rename AbstractAudioContext to BaseAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ASSERT(isGraphOwner()) instead of DCHECK Created 4 years, 5 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 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // This will propagate the channel count to any nodes connected further downstream in the graph. 112 // This will propagate the channel count to any nodes connected further downstream in the graph.
113 output(0).setNumberOfChannels(numberOfChannels); 113 output(0).setNumberOfChannels(numberOfChannels);
114 initialize(); 114 initialize();
115 } 115 }
116 116
117 AudioHandler::checkNumberOfChannelsForInput(input); 117 AudioHandler::checkNumberOfChannelsForInput(input);
118 } 118 }
119 119
120 // ---------------------------------------------------------------- 120 // ----------------------------------------------------------------
121 121
122 GainNode::GainNode(AbstractAudioContext& context) 122 GainNode::GainNode(BaseAudioContext& context)
123 : AudioNode(context) 123 : AudioNode(context)
124 , m_gain(AudioParam::create(context, ParamTypeGainGain, 1.0)) 124 , m_gain(AudioParam::create(context, ParamTypeGainGain, 1.0))
125 { 125 {
126 setHandler(GainHandler::create(*this, context.sampleRate(), m_gain->handler( ))); 126 setHandler(GainHandler::create(*this, context.sampleRate(), m_gain->handler( )));
127 } 127 }
128 128
129 GainNode* GainNode::create(AbstractAudioContext& context, ExceptionState& except ionState) 129 GainNode* GainNode::create(BaseAudioContext& context, ExceptionState& exceptionS tate)
130 { 130 {
131 DCHECK(isMainThread()); 131 DCHECK(isMainThread());
132 132
133 if (context.isContextClosed()) { 133 if (context.isContextClosed()) {
134 context.throwExceptionForClosedState(exceptionState); 134 context.throwExceptionForClosedState(exceptionState);
135 return nullptr; 135 return nullptr;
136 } 136 }
137 137
138 return new GainNode(context); 138 return new GainNode(context);
139 } 139 }
140 140
141 AudioParam* GainNode::gain() const 141 AudioParam* GainNode::gain() const
142 { 142 {
143 return m_gain; 143 return m_gain;
144 } 144 }
145 145
146 DEFINE_TRACE(GainNode) 146 DEFINE_TRACE(GainNode)
147 { 147 {
148 visitor->trace(m_gain); 148 visitor->trace(m_gain);
149 AudioNode::trace(visitor); 149 AudioNode::trace(visitor);
150 } 150 }
151 151
152 } // namespace blink 152 } // namespace blink
153 153
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/GainNode.h ('k') | third_party/WebKit/Source/modules/webaudio/IIRFilterNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698