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

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

Issue 2836293002: Introduce AudioRendererSink::IsOptimizedForHardwareParameters (Closed)
Patch Set: rebase Created 3 years, 7 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_stream_sink.h ('k') | media/audio/clockless_audio_sink.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_stream_sink.h" 5 #include "media/audio/audio_output_stream_sink.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 bool AudioOutputStreamSink::SetVolume(double volume) { 72 bool AudioOutputStreamSink::SetVolume(double volume) {
73 audio_task_runner_->PostTask( 73 audio_task_runner_->PostTask(
74 FROM_HERE, base::Bind(&AudioOutputStreamSink::DoSetVolume, this, volume)); 74 FROM_HERE, base::Bind(&AudioOutputStreamSink::DoSetVolume, this, volume));
75 return true; 75 return true;
76 } 76 }
77 77
78 OutputDeviceInfo AudioOutputStreamSink::GetOutputDeviceInfo() { 78 OutputDeviceInfo AudioOutputStreamSink::GetOutputDeviceInfo() {
79 return OutputDeviceInfo(); 79 return OutputDeviceInfo();
80 } 80 }
81 81
82 bool AudioOutputStreamSink::IsOptimizedForHardwareParameters() {
83 return true;
84 }
85
82 bool AudioOutputStreamSink::CurrentThreadIsRenderingThread() { 86 bool AudioOutputStreamSink::CurrentThreadIsRenderingThread() {
83 NOTIMPLEMENTED(); 87 NOTIMPLEMENTED();
84 return false; 88 return false;
85 } 89 }
86 90
87 int AudioOutputStreamSink::OnMoreData(base::TimeDelta delay, 91 int AudioOutputStreamSink::OnMoreData(base::TimeDelta delay,
88 base::TimeTicks delay_timestamp, 92 base::TimeTicks delay_timestamp,
89 int prior_frames_skipped, 93 int prior_frames_skipped,
90 AudioBus* dest) { 94 AudioBus* dest) {
91 // Note: Runs on the audio thread created by the OS. 95 // Note: Runs on the audio thread created by the OS.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 DCHECK(audio_task_runner_->BelongsToCurrentThread()); 153 DCHECK(audio_task_runner_->BelongsToCurrentThread());
150 stream_->SetVolume(volume); 154 stream_->SetVolume(volume);
151 } 155 }
152 156
153 void AudioOutputStreamSink::ClearCallback() { 157 void AudioOutputStreamSink::ClearCallback() {
154 base::AutoLock al(callback_lock_); 158 base::AutoLock al(callback_lock_);
155 active_render_callback_ = NULL; 159 active_render_callback_ = NULL;
156 } 160 }
157 161
158 } // namespace media 162 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_output_stream_sink.h ('k') | media/audio/clockless_audio_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698