OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/renderer/renderer_webaudiodevice_impl.h" | 5 #include "content/renderer/renderer_webaudiodevice_impl.h" |
6 | 6 |
7 using WebKit::WebAudioDevice; | 7 using WebKit::WebAudioDevice; |
8 using WebKit::WebVector; | 8 using WebKit::WebVector; |
9 | 9 |
10 RendererWebAudioDeviceImpl::RendererWebAudioDeviceImpl(size_t buffer_size, | 10 RendererWebAudioDeviceImpl::RendererWebAudioDeviceImpl(size_t buffer_size, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 if (client_callback_) { | 44 if (client_callback_) { |
45 // Wrap the pointers using WebVector. | 45 // Wrap the pointers using WebVector. |
46 WebVector<float*> web_audio_data(audio_data.size()); | 46 WebVector<float*> web_audio_data(audio_data.size()); |
47 for (size_t i = 0; i < audio_data.size(); ++i) | 47 for (size_t i = 0; i < audio_data.size(); ++i) |
48 web_audio_data[i] = audio_data[i]; | 48 web_audio_data[i] = audio_data[i]; |
49 | 49 |
50 client_callback_->render(web_audio_data, number_of_frames); | 50 client_callback_->render(web_audio_data, number_of_frames); |
51 } | 51 } |
52 return number_of_frames; | 52 return number_of_frames; |
53 } | 53 } |
| 54 |
| 55 void RendererWebAudioDeviceImpl::OnError() { |
| 56 // TODO(crogers): implement error handling. |
| 57 } |
OLD | NEW |