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

Side by Side Diff: third_party/WebKit/Source/platform/audio/ReverbConvolver.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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 m_backgroundStages[i]->processInBackground(this, SliceSize); 167 m_backgroundStages[i]->processInBackground(this, SliceSize);
168 } 168 }
169 } 169 }
170 170
171 void ReverbConvolver::process(const AudioChannel* sourceChannel, 171 void ReverbConvolver::process(const AudioChannel* sourceChannel,
172 AudioChannel* destinationChannel, 172 AudioChannel* destinationChannel,
173 size_t framesToProcess) { 173 size_t framesToProcess) {
174 bool isSafe = sourceChannel && destinationChannel && 174 bool isSafe = sourceChannel && destinationChannel &&
175 sourceChannel->length() >= framesToProcess && 175 sourceChannel->length() >= framesToProcess &&
176 destinationChannel->length() >= framesToProcess; 176 destinationChannel->length() >= framesToProcess;
177 ASSERT(isSafe); 177 DCHECK(isSafe);
178 if (!isSafe) 178 if (!isSafe)
179 return; 179 return;
180 180
181 const float* source = sourceChannel->data(); 181 const float* source = sourceChannel->data();
182 float* destination = destinationChannel->mutableData(); 182 float* destination = destinationChannel->mutableData();
183 bool isDataSafe = source && destination; 183 bool isDataSafe = source && destination;
184 ASSERT(isDataSafe); 184 DCHECK(isDataSafe);
185 if (!isDataSafe) 185 if (!isDataSafe)
186 return; 186 return;
187 187
188 // Feed input buffer (read by all threads) 188 // Feed input buffer (read by all threads)
189 m_inputBuffer.write(source, framesToProcess); 189 m_inputBuffer.write(source, framesToProcess);
190 190
191 // Accumulate contributions from each stage 191 // Accumulate contributions from each stage
192 for (size_t i = 0; i < m_stages.size(); ++i) 192 for (size_t i = 0; i < m_stages.size(); ++i)
193 m_stages[i]->process(source, framesToProcess); 193 m_stages[i]->process(source, framesToProcess);
194 194
(...skipping 17 matching lines...) Expand all
212 212
213 m_accumulationBuffer.reset(); 213 m_accumulationBuffer.reset();
214 m_inputBuffer.reset(); 214 m_inputBuffer.reset();
215 } 215 }
216 216
217 size_t ReverbConvolver::latencyFrames() const { 217 size_t ReverbConvolver::latencyFrames() const {
218 return 0; 218 return 0;
219 } 219 }
220 220
221 } // namespace blink 221 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698