| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 | 468 |
| 469 assert(_audioFrame.num_channels_ == 2); | 469 assert(_audioFrame.num_channels_ == 2); |
| 470 AudioFrameOperations::Scale(_panLeft, _panRight, _audioFrame); | 470 AudioFrameOperations::Scale(_panLeft, _panRight, _audioFrame); |
| 471 } | 471 } |
| 472 | 472 |
| 473 // --- Far-end Voice Quality Enhancement (AudioProcessing Module) | 473 // --- Far-end Voice Quality Enhancement (AudioProcessing Module) |
| 474 if (feed_data_to_apm) { | 474 if (feed_data_to_apm) { |
| 475 if (_audioProcessingModulePtr->ProcessReverseStream(&_audioFrame) != 0) { | 475 if (_audioProcessingModulePtr->ProcessReverseStream(&_audioFrame) != 0) { |
| 476 WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId, -1), | 476 WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId, -1), |
| 477 "AudioProcessingModule::ProcessReverseStream() => error"); | 477 "AudioProcessingModule::ProcessReverseStream() => error"); |
| 478 RTC_DCHECK(false); | 478 RTC_NOTREACHED(); |
| 479 } | 479 } |
| 480 } | 480 } |
| 481 | 481 |
| 482 // --- External media processing | 482 // --- External media processing |
| 483 { | 483 { |
| 484 rtc::CritScope cs(&_callbackCritSect); | 484 rtc::CritScope cs(&_callbackCritSect); |
| 485 if (_externalMedia) | 485 if (_externalMedia) |
| 486 { | 486 { |
| 487 const bool is_stereo = (_audioFrame.num_channels_ == 2); | 487 const bool is_stereo = (_audioFrame.num_channels_ == 2); |
| 488 if (_externalMediaCallbackPtr) | 488 if (_externalMediaCallbackPtr) |
| 489 { | 489 { |
| 490 _externalMediaCallbackPtr->Process( | 490 _externalMediaCallbackPtr->Process( |
| 491 -1, | 491 -1, |
| 492 kPlaybackAllChannelsMixed, | 492 kPlaybackAllChannelsMixed, |
| 493 (int16_t*)_audioFrame.data_, | 493 (int16_t*)_audioFrame.data_, |
| 494 _audioFrame.samples_per_channel_, | 494 _audioFrame.samples_per_channel_, |
| 495 _audioFrame.sample_rate_hz_, | 495 _audioFrame.sample_rate_hz_, |
| 496 is_stereo); | 496 is_stereo); |
| 497 } | 497 } |
| 498 } | 498 } |
| 499 } | 499 } |
| 500 | 500 |
| 501 // --- Measure audio level (0-9) for the combined signal | 501 // --- Measure audio level (0-9) for the combined signal |
| 502 _audioLevel.ComputeLevel(_audioFrame); | 502 _audioLevel.ComputeLevel(_audioFrame); |
| 503 | 503 |
| 504 return 0; | 504 return 0; |
| 505 } | 505 } |
| 506 } // namespace voe | 506 } // namespace voe |
| 507 } // namespace webrtc | 507 } // namespace webrtc |
| OLD | NEW |