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

Side by Side Diff: third_party/WebKit/Source/platform/audio/Reverb.cpp

Issue 2803733002: Convert ASSERT(foo) to DCHECK(foo) in platform/audio (Closed)
Patch Set: Mechanical change from ASSERT(foo) to DCHECK(foo) Created 3 years, 8 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Do a fairly comprehensive sanity check. 151 // Do a fairly comprehensive sanity check.
152 // If these conditions are satisfied, all of the source and destination 152 // If these conditions are satisfied, all of the source and destination
153 // pointers will be valid for the various matrixing cases. 153 // pointers will be valid for the various matrixing cases.
154 bool isSafeToProcess = sourceBus && destinationBus && 154 bool isSafeToProcess = sourceBus && destinationBus &&
155 sourceBus->numberOfChannels() > 0 && 155 sourceBus->numberOfChannels() > 0 &&
156 destinationBus->numberOfChannels() > 0 && 156 destinationBus->numberOfChannels() > 0 &&
157 framesToProcess <= MaxFrameSize && 157 framesToProcess <= MaxFrameSize &&
158 framesToProcess <= sourceBus->length() && 158 framesToProcess <= sourceBus->length() &&
159 framesToProcess <= destinationBus->length(); 159 framesToProcess <= destinationBus->length();
160 160
161 ASSERT(isSafeToProcess); 161 DCHECK(isSafeToProcess);
162 if (!isSafeToProcess) 162 if (!isSafeToProcess)
163 return; 163 return;
164 164
165 // For now only handle mono or stereo output 165 // For now only handle mono or stereo output
166 if (destinationBus->numberOfChannels() > 2) { 166 if (destinationBus->numberOfChannels() > 2) {
167 destinationBus->zero(); 167 destinationBus->zero();
168 return; 168 return;
169 } 169 }
170 170
171 AudioChannel* destinationChannelL = destinationBus->channel(0); 171 AudioChannel* destinationChannelL = destinationBus->channel(0);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 void Reverb::reset() { 279 void Reverb::reset() {
280 for (size_t i = 0; i < m_convolvers.size(); ++i) 280 for (size_t i = 0; i < m_convolvers.size(); ++i)
281 m_convolvers[i]->reset(); 281 m_convolvers[i]->reset();
282 } 282 }
283 283
284 size_t Reverb::latencyFrames() const { 284 size_t Reverb::latencyFrames() const {
285 return !m_convolvers.isEmpty() ? m_convolvers.front()->latencyFrames() : 0; 285 return !m_convolvers.isEmpty() ? m_convolvers.front()->latencyFrames() : 0;
286 } 286 }
287 287
288 } // namespace blink 288 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698