Chromium Code Reviews| 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/blink/webaudiosourceprovider_impl.h" | 5 #include "media/blink/webaudiosourceprovider_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 sink_->SetVolume(volume); | 251 sink_->SetVolume(volume); |
| 252 return true; | 252 return true; |
| 253 } | 253 } |
| 254 | 254 |
| 255 OutputDeviceInfo WebAudioSourceProviderImpl::GetOutputDeviceInfo() { | 255 OutputDeviceInfo WebAudioSourceProviderImpl::GetOutputDeviceInfo() { |
| 256 base::AutoLock auto_lock(sink_lock_); | 256 base::AutoLock auto_lock(sink_lock_); |
| 257 return sink_ ? sink_->GetOutputDeviceInfo() | 257 return sink_ ? sink_->GetOutputDeviceInfo() |
| 258 : OutputDeviceInfo(OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND); | 258 : OutputDeviceInfo(OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND); |
| 259 } | 259 } |
| 260 | 260 |
| 261 bool WebAudioSourceProviderImpl::IsOptimizedForHardwareParameters() { | |
| 262 return client_ ? false : true; | |
|
o1ka
2017/05/16 10:31:19
Access to |client_| is guarded everywhere by |sink
flim-chromium
2017/05/16 11:04:05
Thanks for spotting this! I think it would actuall
| |
| 263 } | |
| 264 | |
| 261 bool WebAudioSourceProviderImpl::CurrentThreadIsRenderingThread() { | 265 bool WebAudioSourceProviderImpl::CurrentThreadIsRenderingThread() { |
| 262 NOTIMPLEMENTED(); | 266 NOTIMPLEMENTED(); |
| 263 return false; | 267 return false; |
| 264 } | 268 } |
| 265 | 269 |
| 266 void WebAudioSourceProviderImpl::SwitchOutputDevice( | 270 void WebAudioSourceProviderImpl::SwitchOutputDevice( |
| 267 const std::string& device_id, | 271 const std::string& device_id, |
| 268 const url::Origin& security_origin, | 272 const url::Origin& security_origin, |
| 269 const OutputDeviceStatusCB& callback) { | 273 const OutputDeviceStatusCB& callback) { |
| 270 base::AutoLock auto_lock(sink_lock_); | 274 base::AutoLock auto_lock(sink_lock_); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 332 | 336 |
| 333 return num_rendered_frames; | 337 return num_rendered_frames; |
| 334 } | 338 } |
| 335 | 339 |
| 336 void WebAudioSourceProviderImpl::TeeFilter::OnRenderError() { | 340 void WebAudioSourceProviderImpl::TeeFilter::OnRenderError() { |
| 337 DCHECK(IsInitialized()); | 341 DCHECK(IsInitialized()); |
| 338 renderer_->OnRenderError(); | 342 renderer_->OnRenderError(); |
| 339 } | 343 } |
| 340 | 344 |
| 341 } // namespace media | 345 } // namespace media |
| OLD | NEW |