| 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/render_audiosourceprovider.h" | 5 #include "content/renderer/media/render_audiosourceprovider.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide
rClient.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide
rClient.h" |
| 10 | 10 |
| 11 using std::vector; | 11 using std::vector; |
| 12 using WebKit::WebVector; | 12 using WebKit::WebVector; |
| 13 | 13 |
| 14 RenderAudioSourceProvider::RenderAudioSourceProvider() | 14 RenderAudioSourceProvider::RenderAudioSourceProvider() |
| 15 : is_initialized_(false), | 15 : is_initialized_(false), |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 // TODO(crogers): figure out if we should volume scale here or in common | 140 // TODO(crogers): figure out if we should volume scale here or in common |
| 141 // WebAudio code. In any case we need to take care of volume. | 141 // WebAudio code. In any case we need to take care of volume. |
| 142 renderer_->Render(v, number_of_frames, 0); | 142 renderer_->Render(v, number_of_frames, 0); |
| 143 } else { | 143 } else { |
| 144 // Provide silence if the source is not running. | 144 // Provide silence if the source is not running. |
| 145 for (size_t i = 0; i < audio_data.size(); ++i) | 145 for (size_t i = 0; i < audio_data.size(); ++i) |
| 146 memset(audio_data[i], 0, sizeof(float) * number_of_frames); | 146 memset(audio_data[i], 0, sizeof(float) * number_of_frames); |
| 147 } | 147 } |
| 148 } | 148 } |
| OLD | NEW |