| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/audio_renderer_mixer.h" | 5 #include "media/base/audio_renderer_mixer.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 error_callbacks_.erase(it); | 146 error_callbacks_.erase(it); |
| 147 return; | 147 return; |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 | 150 |
| 151 // An error callback should always exist when called. | 151 // An error callback should always exist when called. |
| 152 NOTREACHED(); | 152 NOTREACHED(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 OutputDeviceInfo AudioRendererMixer::GetOutputDeviceInfo() { | 155 OutputDeviceInfo AudioRendererMixer::GetOutputDeviceInfo() { |
| 156 DVLOG(1) << __FUNCTION__; | 156 DVLOG(1) << __func__; |
| 157 return audio_sink_->GetOutputDeviceInfo(); | 157 return audio_sink_->GetOutputDeviceInfo(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 bool AudioRendererMixer::CurrentThreadIsRenderingThread() { | 160 bool AudioRendererMixer::CurrentThreadIsRenderingThread() { |
| 161 return audio_sink_->CurrentThreadIsRenderingThread(); | 161 return audio_sink_->CurrentThreadIsRenderingThread(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 int AudioRendererMixer::Render(AudioBus* audio_bus, | 164 int AudioRendererMixer::Render(AudioBus* audio_bus, |
| 165 uint32_t frames_delayed, | 165 uint32_t frames_delayed, |
| 166 uint32_t frames_skipped) { | 166 uint32_t frames_skipped) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 182 } | 182 } |
| 183 | 183 |
| 184 void AudioRendererMixer::OnRenderError() { | 184 void AudioRendererMixer::OnRenderError() { |
| 185 // Call each mixer input and signal an error. | 185 // Call each mixer input and signal an error. |
| 186 base::AutoLock auto_lock(lock_); | 186 base::AutoLock auto_lock(lock_); |
| 187 for (const auto& cb : error_callbacks_) | 187 for (const auto& cb : error_callbacks_) |
| 188 cb.Run(); | 188 cb.Run(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 } // namespace media | 191 } // namespace media |
| OLD | NEW |