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

Side by Side Diff: Source/platform/audio/AudioDestination.cpp

Issue 906233002: Use nullptr instead of 0 in WebAudio (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 9 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
« no previous file with comments | « Source/platform/audio/AudioDSPKernel.h ('k') | Source/platform/audio/HRTFPanner.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 for (unsigned i = 0; i < m_numberOfOutputChannels; ++i) 161 for (unsigned i = 0; i < m_numberOfOutputChannels; ++i)
162 m_renderBus->setChannelMemory(i, audioData[i], numberOfFrames); 162 m_renderBus->setChannelMemory(i, audioData[i], numberOfFrames);
163 163
164 m_fifo->consume(m_renderBus.get(), numberOfFrames); 164 m_fifo->consume(m_renderBus.get(), numberOfFrames);
165 } 165 }
166 166
167 void AudioDestination::provideInput(AudioBus* bus, size_t framesToProcess) 167 void AudioDestination::provideInput(AudioBus* bus, size_t framesToProcess)
168 { 168 {
169 AudioBus* sourceBus = 0; 169 AudioBus* sourceBus = nullptr;
170 if (m_inputFifo->framesInFifo() >= framesToProcess) { 170 if (m_inputFifo->framesInFifo() >= framesToProcess) {
171 m_inputFifo->consume(m_inputBus.get(), framesToProcess); 171 m_inputFifo->consume(m_inputBus.get(), framesToProcess);
172 sourceBus = m_inputBus.get(); 172 sourceBus = m_inputBus.get();
173 } 173 }
174 174
175 m_callback.render(sourceBus, bus, framesToProcess); 175 m_callback.render(sourceBus, bus, framesToProcess);
176 } 176 }
177 177
178 } // namespace blink 178 } // namespace blink
179 179
180 #endif // ENABLE(WEB_AUDIO) 180 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/platform/audio/AudioDSPKernel.h ('k') | Source/platform/audio/HRTFPanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698