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

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

Issue 2836293002: Introduce AudioRendererSink::IsOptimizedForHardwareParameters (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/clockless_audio_sink.h" 5 #include "media/audio/clockless_audio_sink.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/simple_thread.h" 10 #include "base/threading/simple_thread.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 playing_ = false; 124 playing_ = false;
125 playback_time_ = thread_->Stop(); 125 playback_time_ = thread_->Stop();
126 } 126 }
127 127
128 bool ClocklessAudioSink::SetVolume(double volume) { 128 bool ClocklessAudioSink::SetVolume(double volume) {
129 // Audio is always muted. 129 // Audio is always muted.
130 return volume == 0.0; 130 return volume == 0.0;
131 } 131 }
132 132
133 OutputDeviceInfo ClocklessAudioSink::GetOutputDeviceInfo() { 133 OutputDeviceInfo ClocklessAudioSink::GetOutputDeviceInfo(
134 const AudioParameters& preferred_params) {
134 return device_info_; 135 return device_info_;
135 } 136 }
136 137
137 bool ClocklessAudioSink::CurrentThreadIsRenderingThread() { 138 bool ClocklessAudioSink::CurrentThreadIsRenderingThread() {
138 NOTIMPLEMENTED(); 139 NOTIMPLEMENTED();
139 return false; 140 return false;
140 } 141 }
141 142
142 void ClocklessAudioSink::StartAudioHashForTesting() { 143 void ClocklessAudioSink::StartAudioHashForTesting() {
143 DCHECK(!initialized_); 144 DCHECK(!initialized_);
144 hashing_ = true; 145 hashing_ = true;
145 } 146 }
146 147
147 std::string ClocklessAudioSink::GetAudioHashForTesting() { 148 std::string ClocklessAudioSink::GetAudioHashForTesting() {
148 return thread_ && hashing_ ? thread_->GetAudioHash() : std::string(); 149 return thread_ && hashing_ ? thread_->GetAudioHash() : std::string();
149 } 150 }
150 151
151 } // namespace media 152 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698