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

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

Issue 2803073002: Convert RELEASE_ASSERT()/ASSERT(...) to CHECK()/DCHECK_op(...) in platform/audio (Closed)
Patch Set: Removing DCHECK_IS_ON from FFTFrameOpenMAXDLAndroid.cpp 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 MutexLocker locker(m_processLock); 61 MutexLocker locker(m_processLock);
62 m_kernels.clear(); 62 m_kernels.clear();
63 63
64 m_initialized = false; 64 m_initialized = false;
65 } 65 }
66 66
67 void AudioDSPKernelProcessor::process(const AudioBus* source, 67 void AudioDSPKernelProcessor::process(const AudioBus* source,
68 AudioBus* destination, 68 AudioBus* destination,
69 size_t framesToProcess) { 69 size_t framesToProcess) {
70 ASSERT(source && destination); 70 DCHECK(source);
71 DCHECK(destination);
71 if (!source || !destination) 72 if (!source || !destination)
72 return; 73 return;
73 74
74 if (!isInitialized()) { 75 if (!isInitialized()) {
75 destination->zero(); 76 destination->zero();
76 return; 77 return;
77 } 78 }
78 79
79 MutexTryLocker tryLocker(m_processLock); 80 MutexTryLocker tryLocker(m_processLock);
80 if (tryLocker.locked()) { 81 if (tryLocker.locked()) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 if (tryLocker.locked()) { 154 if (tryLocker.locked()) {
154 // It is expected that all the kernels have the same latencyTime. 155 // It is expected that all the kernels have the same latencyTime.
155 return !m_kernels.isEmpty() ? m_kernels.front()->latencyTime() : 0; 156 return !m_kernels.isEmpty() ? m_kernels.front()->latencyTime() : 0;
156 } 157 }
157 // Since we don't want to block the Audio Device thread, we return a large 158 // Since we don't want to block the Audio Device thread, we return a large
158 // value instead of trying to acquire the lock. 159 // value instead of trying to acquire the lock.
159 return std::numeric_limits<double>::infinity(); 160 return std::numeric_limits<double>::infinity();
160 } 161 }
161 162
162 } // namespace blink 163 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698