| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 if (err != AudioProcessing::kNoError) { | 110 if (err != AudioProcessing::kNoError) { |
| 111 return MapError(err); // TODO(ajm): warning possible? | 111 return MapError(err); // TODO(ajm): warning possible? |
| 112 } | 112 } |
| 113 | 113 |
| 114 // Buffer the samples in the render queue. | 114 // Buffer the samples in the render queue. |
| 115 render_queue_buffer_.insert(render_queue_buffer_.end(), | 115 render_queue_buffer_.insert(render_queue_buffer_.end(), |
| 116 audio->split_bands_const_f(j)[kBand0To8kHz], | 116 audio->split_bands_const_f(j)[kBand0To8kHz], |
| 117 (audio->split_bands_const_f(j)[kBand0To8kHz] + | 117 (audio->split_bands_const_f(j)[kBand0To8kHz] + |
| 118 audio->num_frames_per_band())); | 118 audio->num_frames_per_band())); |
| 119 |
| 120 handle_index++; |
| 119 } | 121 } |
| 120 } | 122 } |
| 121 | 123 |
| 122 // Insert the samples into the queue. | 124 // Insert the samples into the queue. |
| 123 if (!render_signal_queue_->Insert(&render_queue_buffer_)) { | 125 if (!render_signal_queue_->Insert(&render_queue_buffer_)) { |
| 124 // The data queue is full and needs to be emptied. | 126 // The data queue is full and needs to be emptied. |
| 125 ReadQueuedRenderData(); | 127 ReadQueuedRenderData(); |
| 126 | 128 |
| 127 // Retry the insert (should always work). | 129 // Retry the insert (should always work). |
| 128 RTC_DCHECK_EQ(render_signal_queue_->Insert(&render_queue_buffer_), true); | 130 RTC_DCHECK_EQ(render_signal_queue_->Insert(&render_queue_buffer_), true); |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 // Not locked as it only relies on APM public API which is threadsafe. | 503 // Not locked as it only relies on APM public API which is threadsafe. |
| 502 return apm_->num_output_channels() * apm_->num_reverse_channels(); | 504 return apm_->num_output_channels() * apm_->num_reverse_channels(); |
| 503 } | 505 } |
| 504 | 506 |
| 505 int EchoCancellationImpl::GetHandleError(void* handle) const { | 507 int EchoCancellationImpl::GetHandleError(void* handle) const { |
| 506 // Not locked as it does not rely on anything in the state. | 508 // Not locked as it does not rely on anything in the state. |
| 507 assert(handle != NULL); | 509 assert(handle != NULL); |
| 508 return AudioProcessing::kUnspecifiedError; | 510 return AudioProcessing::kUnspecifiedError; |
| 509 } | 511 } |
| 510 } // namespace webrtc | 512 } // namespace webrtc |
| OLD | NEW |