| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |