| 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" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
| 12 #include "media/base/bind_to_current_loop.h" | 13 #include "media/base/bind_to_current_loop.h" |
| 13 #include "third_party/WebKit/public/platform/WebAudioSourceProviderClient.h" | 14 #include "third_party/WebKit/public/platform/WebAudioSourceProviderClient.h" |
| 14 | 15 |
| 15 using blink::WebVector; | 16 using blink::WebVector; |
| 16 | 17 |
| 17 namespace media { | 18 namespace media { |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 | 21 |
| 21 // Simple helper class for Try() locks. Lock is Try()'d on construction and | 22 // Simple helper class for Try() locks. Lock is Try()'d on construction and |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 void WebAudioSourceProviderImpl::OnSetFormat() { | 190 void WebAudioSourceProviderImpl::OnSetFormat() { |
| 190 base::AutoLock auto_lock(sink_lock_); | 191 base::AutoLock auto_lock(sink_lock_); |
| 191 if (!client_) | 192 if (!client_) |
| 192 return; | 193 return; |
| 193 | 194 |
| 194 // Inform Blink about the audio stream format. | 195 // Inform Blink about the audio stream format. |
| 195 client_->setFormat(channels_, sample_rate_); | 196 client_->setFormat(channels_, sample_rate_); |
| 196 } | 197 } |
| 197 | 198 |
| 198 } // namespace media | 199 } // namespace media |
| OLD | NEW |