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

Side by Side Diff: media/audio/audio_low_latency_input_output_unittest.cc

Issue 10184011: Remove unused parameter "stream" from all variants of OnMoreData(). (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_io.h ('k') | media/audio/audio_output_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/environment.h" 6 #include "base/environment.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // enough to handle the current sample test scenario. 211 // enough to handle the current sample test scenario.
212 buffer_->set_forward_capacity(2 * buffer_->forward_capacity()); 212 buffer_->set_forward_capacity(2 * buffer_->forward_capacity());
213 buffer_->Clear(); 213 buffer_->Clear();
214 } 214 }
215 } 215 }
216 216
217 virtual void OnClose(AudioInputStream* stream) OVERRIDE {} 217 virtual void OnClose(AudioInputStream* stream) OVERRIDE {}
218 virtual void OnError(AudioInputStream* stream, int code) OVERRIDE {} 218 virtual void OnError(AudioInputStream* stream, int code) OVERRIDE {}
219 219
220 // AudioOutputStream::AudioSourceCallback. 220 // AudioOutputStream::AudioSourceCallback.
221 virtual uint32 OnMoreData(AudioOutputStream* stream, 221 virtual uint32 OnMoreData(uint8* dest,
222 uint8* dest, uint32 max_size, 222 uint32 max_size,
223 AudioBuffersState buffers_state) OVERRIDE { 223 AudioBuffersState buffers_state) OVERRIDE {
224 base::AutoLock lock(lock_); 224 base::AutoLock lock(lock_);
225 225
226 // Update one component in the AudioDelayState for the packet 226 // Update one component in the AudioDelayState for the packet
227 // which is about to be played out. 227 // which is about to be played out.
228 if (output_elements_to_write_ < kMaxDelayMeasurements) { 228 if (output_elements_to_write_ < kMaxDelayMeasurements) {
229 int output_delay_bytes = buffers_state.hardware_delay_bytes; 229 int output_delay_bytes = buffers_state.hardware_delay_bytes;
230 #if defined(OS_WIN) 230 #if defined(OS_WIN)
231 // Special fix for Windows in combination with Wave where the 231 // Special fix for Windows in combination with Wave where the
232 // pending bytes field of the audio buffer state is used to 232 // pending bytes field of the audio buffer state is used to
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 457
458 // All Close() operations that run on the mocked audio thread, 458 // All Close() operations that run on the mocked audio thread,
459 // should be synchronous and not post additional close tasks to 459 // should be synchronous and not post additional close tasks to
460 // mocked the audio thread. Hence, there is no need to call 460 // mocked the audio thread. Hence, there is no need to call
461 // message_loop()->RunAllPending() after the Close() methods. 461 // message_loop()->RunAllPending() after the Close() methods.
462 aos->Close(); 462 aos->Close();
463 ais->Close(); 463 ais->Close();
464 } 464 }
465 465
466 } // namespace media 466 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_io.h ('k') | media/audio/audio_output_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698