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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/ConvolverNode.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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 MutexTryLocker tryLocker(m_processLock); 160 MutexTryLocker tryLocker(m_processLock);
161 if (tryLocker.locked()) 161 if (tryLocker.locked())
162 return m_reverb ? m_reverb->latencyFrames() / static_cast<double>(sample Rate()) : 0; 162 return m_reverb ? m_reverb->latencyFrames() / static_cast<double>(sample Rate()) : 0;
163 // Since we don't want to block the Audio Device thread, we return a large v alue 163 // Since we don't want to block the Audio Device thread, we return a large v alue
164 // instead of trying to acquire the lock. 164 // instead of trying to acquire the lock.
165 return std::numeric_limits<double>::infinity(); 165 return std::numeric_limits<double>::infinity();
166 } 166 }
167 167
168 // ---------------------------------------------------------------- 168 // ----------------------------------------------------------------
169 169
170 ConvolverNode::ConvolverNode(AbstractAudioContext& context) 170 ConvolverNode::ConvolverNode(BaseAudioContext& context)
171 : AudioNode(context) 171 : AudioNode(context)
172 { 172 {
173 setHandler(ConvolverHandler::create(*this, context.sampleRate())); 173 setHandler(ConvolverHandler::create(*this, context.sampleRate()));
174 } 174 }
175 175
176 ConvolverNode* ConvolverNode::create(AbstractAudioContext& context, ExceptionSta te& exceptionState) 176 ConvolverNode* ConvolverNode::create(BaseAudioContext& context, ExceptionState& exceptionState)
177 { 177 {
178 DCHECK(isMainThread()); 178 DCHECK(isMainThread());
179 179
180 if (context.isContextClosed()) { 180 if (context.isContextClosed()) {
181 context.throwExceptionForClosedState(exceptionState); 181 context.throwExceptionForClosedState(exceptionState);
182 return nullptr; 182 return nullptr;
183 } 183 }
184 184
185 return new ConvolverNode(context); 185 return new ConvolverNode(context);
186 } 186 }
(...skipping 18 matching lines...) Expand all
205 return convolverHandler().normalize(); 205 return convolverHandler().normalize();
206 } 206 }
207 207
208 void ConvolverNode::setNormalize(bool normalize) 208 void ConvolverNode::setNormalize(bool normalize)
209 { 209 {
210 convolverHandler().setNormalize(normalize); 210 convolverHandler().setNormalize(normalize);
211 } 211 }
212 212
213 } // namespace blink 213 } // namespace blink
214 214
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698