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

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

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h Created 3 years, 11 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 30 matching lines...) Expand all
41 41
42 void AudioDSPKernelProcessor::initialize() { 42 void AudioDSPKernelProcessor::initialize() {
43 if (isInitialized()) 43 if (isInitialized())
44 return; 44 return;
45 45
46 MutexLocker locker(m_processLock); 46 MutexLocker locker(m_processLock);
47 ASSERT(!m_kernels.size()); 47 ASSERT(!m_kernels.size());
48 48
49 // Create processing kernels, one per channel. 49 // Create processing kernels, one per channel.
50 for (unsigned i = 0; i < numberOfChannels(); ++i) 50 for (unsigned i = 0; i < numberOfChannels(); ++i)
51 m_kernels.append(createKernel()); 51 m_kernels.push_back(createKernel());
52 52
53 m_initialized = true; 53 m_initialized = true;
54 m_hasJustReset = true; 54 m_hasJustReset = true;
55 } 55 }
56 56
57 void AudioDSPKernelProcessor::uninitialize() { 57 void AudioDSPKernelProcessor::uninitialize() {
58 if (!isInitialized()) 58 if (!isInitialized())
59 return; 59 return;
60 60
61 MutexLocker locker(m_processLock); 61 MutexLocker locker(m_processLock);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 if (tryLocker.locked()) { 139 if (tryLocker.locked()) {
140 // It is expected that all the kernels have the same latencyTime. 140 // It is expected that all the kernels have the same latencyTime.
141 return !m_kernels.isEmpty() ? m_kernels.front()->latencyTime() : 0; 141 return !m_kernels.isEmpty() ? m_kernels.front()->latencyTime() : 0;
142 } 142 }
143 // Since we don't want to block the Audio Device thread, we return a large 143 // Since we don't want to block the Audio Device thread, we return a large
144 // value instead of trying to acquire the lock. 144 // value instead of trying to acquire the lock.
145 return std::numeric_limits<double>::infinity(); 145 return std::numeric_limits<double>::infinity();
146 } 146 }
147 147
148 } // namespace blink 148 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/audio/AudioBus.cpp ('k') | third_party/WebKit/Source/platform/audio/AudioResampler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698