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

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

Issue 630853002: Replacing the OVERRIDE with override in third_party/WebKit/Source/platform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase build fix Created 6 years, 2 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/MultiChannelResampler.cpp ('k') | Source/platform/blob/BlobRegistry.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 class BufferSourceProvider FINAL : public AudioSourceProvider { 148 class BufferSourceProvider FINAL : public AudioSourceProvider {
149 public: 149 public:
150 BufferSourceProvider(const float* source, size_t numberOfSourceFrames) 150 BufferSourceProvider(const float* source, size_t numberOfSourceFrames)
151 : m_source(source) 151 : m_source(source)
152 , m_sourceFramesAvailable(numberOfSourceFrames) 152 , m_sourceFramesAvailable(numberOfSourceFrames)
153 { 153 {
154 } 154 }
155 155
156 // Consumes samples from the in-memory buffer. 156 // Consumes samples from the in-memory buffer.
157 virtual void provideInput(AudioBus* bus, size_t framesToProcess) OVERRIDE 157 virtual void provideInput(AudioBus* bus, size_t framesToProcess) override
158 { 158 {
159 ASSERT(m_source && bus); 159 ASSERT(m_source && bus);
160 if (!m_source || !bus) 160 if (!m_source || !bus)
161 return; 161 return;
162 162
163 float* buffer = bus->channel(0)->mutableData(); 163 float* buffer = bus->channel(0)->mutableData();
164 164
165 // Clamp to number of frames available and zero-pad. 165 // Clamp to number of frames available and zero-pad.
166 size_t framesToCopy = std::min(m_sourceFramesAvailable, framesToProcess) ; 166 size_t framesToCopy = std::min(m_sourceFramesAvailable, framesToProcess) ;
167 memcpy(buffer, m_source, sizeof(float) * framesToCopy); 167 memcpy(buffer, m_source, sizeof(float) * framesToCopy);
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 464
465 // Step (4) 465 // Step (4)
466 // Refresh the buffer with more input. 466 // Refresh the buffer with more input.
467 consumeSource(r5, m_blockSize); 467 consumeSource(r5, m_blockSize);
468 } 468 }
469 } 469 }
470 470
471 } // namespace blink 471 } // namespace blink
472 472
473 #endif // ENABLE(WEB_AUDIO) 473 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/platform/audio/MultiChannelResampler.cpp ('k') | Source/platform/blob/BlobRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698