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

Side by Side Diff: media/blink/webaudiosourceprovider_impl.cc

Issue 2836293002: Introduce AudioRendererSink::IsOptimizedForHardwareParameters (Closed)
Patch Set: Rename to IsOptimizedForHardwareParameters and set some to false Created 3 years, 7 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
« no previous file with comments | « media/blink/webaudiosourceprovider_impl.h ('k') | media/renderers/audio_renderer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « media/blink/webaudiosourceprovider_impl.h ('k') | media/renderers/audio_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698