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

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

Issue 12611030: Remove unused parameter to OnError() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits + rebase Created 7 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 | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/cras/cras_input.cc » ('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 "media/audio/audio_output_resampler.h" 5 #include "media/audio/audio_output_resampler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 19 matching lines...) Expand all
30 OnMoreDataConverter(const AudioParameters& input_params, 30 OnMoreDataConverter(const AudioParameters& input_params,
31 const AudioParameters& output_params); 31 const AudioParameters& output_params);
32 virtual ~OnMoreDataConverter(); 32 virtual ~OnMoreDataConverter();
33 33
34 // AudioSourceCallback interface. 34 // AudioSourceCallback interface.
35 virtual int OnMoreData(AudioBus* dest, 35 virtual int OnMoreData(AudioBus* dest,
36 AudioBuffersState buffers_state) OVERRIDE; 36 AudioBuffersState buffers_state) OVERRIDE;
37 virtual int OnMoreIOData(AudioBus* source, 37 virtual int OnMoreIOData(AudioBus* source,
38 AudioBus* dest, 38 AudioBus* dest,
39 AudioBuffersState buffers_state) OVERRIDE; 39 AudioBuffersState buffers_state) OVERRIDE;
40 virtual void OnError(AudioOutputStream* stream, int code) OVERRIDE; 40 virtual void OnError(AudioOutputStream* stream) OVERRIDE;
41 virtual void WaitTillDataReady() OVERRIDE; 41 virtual void WaitTillDataReady() OVERRIDE;
42 42
43 // Sets |source_callback_|. If this is not a new object, then Stop() must be 43 // Sets |source_callback_|. If this is not a new object, then Stop() must be
44 // called before Start(). 44 // called before Start().
45 void Start(AudioOutputStream::AudioSourceCallback* callback); 45 void Start(AudioOutputStream::AudioSourceCallback* callback);
46 46
47 // Clears |source_callback_| and flushes the resampler. 47 // Clears |source_callback_| and flushes the resampler.
48 void Stop(); 48 void Stop();
49 49
50 private: 50 private:
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 // Zero any unfilled frames if anything was filled, otherwise we'll just 379 // Zero any unfilled frames if anything was filled, otherwise we'll just
380 // return a volume of zero and let AudioConverter drop the output. 380 // return a volume of zero and let AudioConverter drop the output.
381 if (frames > 0 && frames < dest->frames()) 381 if (frames > 0 && frames < dest->frames())
382 dest->ZeroFramesPartial(frames, dest->frames() - frames); 382 dest->ZeroFramesPartial(frames, dest->frames() - frames);
383 383
384 // TODO(dalecurtis): Return the correct volume here. 384 // TODO(dalecurtis): Return the correct volume here.
385 return frames > 0 ? 1 : 0; 385 return frames > 0 ? 1 : 0;
386 } 386 }
387 387
388 void OnMoreDataConverter::OnError(AudioOutputStream* stream, int code) { 388 void OnMoreDataConverter::OnError(AudioOutputStream* stream) {
389 base::AutoLock auto_lock(source_lock_); 389 base::AutoLock auto_lock(source_lock_);
390 if (source_callback_) 390 if (source_callback_)
391 source_callback_->OnError(stream, code); 391 source_callback_->OnError(stream);
392 } 392 }
393 393
394 void OnMoreDataConverter::WaitTillDataReady() { 394 void OnMoreDataConverter::WaitTillDataReady() {
395 base::AutoLock auto_lock(source_lock_); 395 base::AutoLock auto_lock(source_lock_);
396 if (source_callback_) 396 if (source_callback_)
397 source_callback_->WaitTillDataReady(); 397 source_callback_->WaitTillDataReady();
398 } 398 }
399 399
400 } // namespace media 400 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/cras/cras_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698