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

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

Issue 1809093003: Moving SwitchOutputDevice out of OutputDevice interface, eliminating OutputDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing guidou's comments Created 4 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
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 playing_ = false; 115 playing_ = false;
116 playback_time_ = thread_->Stop(); 116 playback_time_ = thread_->Stop();
117 } 117 }
118 118
119 bool ClocklessAudioSink::SetVolume(double volume) { 119 bool ClocklessAudioSink::SetVolume(double volume) {
120 // Audio is always muted. 120 // Audio is always muted.
121 return volume == 0.0; 121 return volume == 0.0;
122 } 122 }
123 123
124 OutputDevice* ClocklessAudioSink::GetOutputDevice() { 124 OutputDeviceInfo ClocklessAudioSink::GetOutputDeviceInfo() {
125 return nullptr; 125 return OutputDeviceInfo();
126 } 126 }
127 127
128 void ClocklessAudioSink::StartAudioHashForTesting() { 128 void ClocklessAudioSink::StartAudioHashForTesting() {
129 DCHECK(!initialized_); 129 DCHECK(!initialized_);
130 hashing_ = true; 130 hashing_ = true;
131 } 131 }
132 132
133 std::string ClocklessAudioSink::GetAudioHashForTesting() { 133 std::string ClocklessAudioSink::GetAudioHashForTesting() {
134 return thread_ && hashing_ ? thread_->GetAudioHash() : std::string(); 134 return thread_ && hashing_ ? thread_->GetAudioHash() : std::string();
135 } 135 }
136 136
137 } // namespace media 137 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698