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

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

Issue 2752323002: Support Opus Ambisonics playback (Closed)
Patch Set: actually add config_ change Created 3 years, 8 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/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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 bool WebAudioSourceProviderImpl::SetVolume(double volume) { 246 bool WebAudioSourceProviderImpl::SetVolume(double volume) {
247 base::AutoLock auto_lock(sink_lock_); 247 base::AutoLock auto_lock(sink_lock_);
248 volume_ = volume; 248 volume_ = volume;
249 if (!client_ && sink_) 249 if (!client_ && sink_)
250 sink_->SetVolume(volume); 250 sink_->SetVolume(volume);
251 return true; 251 return true;
252 } 252 }
253 253
254 OutputDeviceInfo WebAudioSourceProviderImpl::GetOutputDeviceInfo() { 254 OutputDeviceInfo WebAudioSourceProviderImpl::GetOutputDeviceInfo() {
255 base::AutoLock auto_lock(sink_lock_); 255 base::AutoLock auto_lock(sink_lock_);
256 return sink_ ? sink_->GetOutputDeviceInfo() 256 OutputDeviceInfo info;
257 : OutputDeviceInfo(OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND); 257
258 if (sink_) {
259 info = sink_->GetOutputDeviceInfo();
DaleCurtis 2017/04/06 19:44:42 Instead of returning the true sink parameters when
flim-chromium 2017/04/07 22:01:43 It looks like the |client_| params are set only in
DaleCurtis 2017/04/10 19:38:51 Yes, that's how it works today, but I think we ne
Raymond Toy 2017/04/11 21:51:38 That's probably the right thing to do because some
260 if (client_) {
261 info.SetIsWebAudioSource(true);
262 }
263 } else {
264 info = OutputDeviceInfo(OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND);
265 }
266
267 return info;
258 } 268 }
259 269
260 bool WebAudioSourceProviderImpl::CurrentThreadIsRenderingThread() { 270 bool WebAudioSourceProviderImpl::CurrentThreadIsRenderingThread() {
261 NOTIMPLEMENTED(); 271 NOTIMPLEMENTED();
262 return false; 272 return false;
263 } 273 }
264 274
265 void WebAudioSourceProviderImpl::SwitchOutputDevice( 275 void WebAudioSourceProviderImpl::SwitchOutputDevice(
266 const std::string& device_id, 276 const std::string& device_id,
267 const url::Origin& security_origin, 277 const url::Origin& security_origin,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 341
332 return num_rendered_frames; 342 return num_rendered_frames;
333 } 343 }
334 344
335 void WebAudioSourceProviderImpl::TeeFilter::OnRenderError() { 345 void WebAudioSourceProviderImpl::TeeFilter::OnRenderError() {
336 DCHECK(IsInitialized()); 346 DCHECK(IsInitialized());
337 renderer_->OnRenderError(); 347 renderer_->OnRenderError();
338 } 348 }
339 349
340 } // namespace media 350 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698