| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 return device_info_; | 134 return device_info_; |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool ClocklessAudioSink::IsOptimizedForHardwareParameters() { |
| 138 return false; |
| 139 } |
| 140 |
| 137 bool ClocklessAudioSink::CurrentThreadIsRenderingThread() { | 141 bool ClocklessAudioSink::CurrentThreadIsRenderingThread() { |
| 138 NOTIMPLEMENTED(); | 142 NOTIMPLEMENTED(); |
| 139 return false; | 143 return false; |
| 140 } | 144 } |
| 141 | 145 |
| 142 void ClocklessAudioSink::StartAudioHashForTesting() { | 146 void ClocklessAudioSink::StartAudioHashForTesting() { |
| 143 DCHECK(!initialized_); | 147 DCHECK(!initialized_); |
| 144 hashing_ = true; | 148 hashing_ = true; |
| 145 } | 149 } |
| 146 | 150 |
| 147 std::string ClocklessAudioSink::GetAudioHashForTesting() { | 151 std::string ClocklessAudioSink::GetAudioHashForTesting() { |
| 148 return thread_ && hashing_ ? thread_->GetAudioHash() : std::string(); | 152 return thread_ && hashing_ ? thread_->GetAudioHash() : std::string(); |
| 149 } | 153 } |
| 150 | 154 |
| 151 } // namespace media | 155 } // namespace media |
| OLD | NEW |