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

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

Issue 481193003: Remove AudioBuffersState usage in Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix audio muter build buster. 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 | Annotate | Revision Log
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/virtual_audio_output_stream.h" 5 #include "media/audio/virtual_audio_output_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/audio/virtual_audio_input_stream.h" 8 #include "media/audio/virtual_audio_input_stream.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 DCHECK(thread_checker_.CalledOnValidThread()); 70 DCHECK(thread_checker_.CalledOnValidThread());
71 *volume = volume_; 71 *volume = volume_;
72 } 72 }
73 73
74 double VirtualAudioOutputStream::ProvideInput(AudioBus* audio_bus, 74 double VirtualAudioOutputStream::ProvideInput(AudioBus* audio_bus,
75 base::TimeDelta buffer_delay) { 75 base::TimeDelta buffer_delay) {
76 // Note: This method may be invoked on any one thread, depending on the 76 // Note: This method may be invoked on any one thread, depending on the
77 // platform. 77 // platform.
78 DCHECK(callback_); 78 DCHECK(callback_);
79 79
80 const int frames = callback_->OnMoreData(audio_bus, AudioBuffersState()); 80 const int frames = callback_->OnMoreData(audio_bus, 0);
81 if (frames < audio_bus->frames()) 81 if (frames < audio_bus->frames())
82 audio_bus->ZeroFramesPartial(frames, audio_bus->frames() - frames); 82 audio_bus->ZeroFramesPartial(frames, audio_bus->frames() - frames);
83 83
84 return frames > 0 ? volume_ : 0; 84 return frames > 0 ? volume_ : 0;
85 } 85 }
86 86
87 } // namespace media 87 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/virtual_audio_input_stream_unittest.cc ('k') | media/audio/win/audio_low_latency_output_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698