| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 kCaptureStream, // Noise stream. | 66 kCaptureStream, // Noise stream. |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 // Provides access point to the frequency domain. | 69 // Provides access point to the frequency domain. |
| 70 class TransformCallback : public LappedTransform::Callback { | 70 class TransformCallback : public LappedTransform::Callback { |
| 71 public: | 71 public: |
| 72 TransformCallback(IntelligibilityEnhancer* parent, AudioSource source); | 72 TransformCallback(IntelligibilityEnhancer* parent, AudioSource source); |
| 73 | 73 |
| 74 // All in frequency domain, receives input |in_block|, applies | 74 // All in frequency domain, receives input |in_block|, applies |
| 75 // intelligibility enhancement, and writes result to |out_block|. | 75 // intelligibility enhancement, and writes result to |out_block|. |
| 76 virtual void ProcessAudioBlock(const std::complex<float>* const* in_block, | 76 void ProcessAudioBlock(const std::complex<float>* const* in_block, |
| 77 int in_channels, | 77 int in_channels, |
| 78 int frames, | 78 int frames, |
| 79 int out_channels, | 79 int out_channels, |
| 80 std::complex<float>* const* out_block); | 80 std::complex<float>* const* out_block) override; |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 IntelligibilityEnhancer* parent_; | 83 IntelligibilityEnhancer* parent_; |
| 84 AudioSource source_; | 84 AudioSource source_; |
| 85 }; | 85 }; |
| 86 friend class TransformCallback; | 86 friend class TransformCallback; |
| 87 FRIEND_TEST_ALL_PREFIXES(IntelligibilityEnhancerTest, TestErbCreation); | 87 FRIEND_TEST_ALL_PREFIXES(IntelligibilityEnhancerTest, TestErbCreation); |
| 88 FRIEND_TEST_ALL_PREFIXES(IntelligibilityEnhancerTest, TestSolveForGains); | 88 FRIEND_TEST_ALL_PREFIXES(IntelligibilityEnhancerTest, TestSolveForGains); |
| 89 | 89 |
| 90 // Sends streams to ProcessClearBlock or ProcessNoiseBlock based on source. | 90 // Sends streams to ProcessClearBlock or ProcessNoiseBlock based on source. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // Note: VAD currently does not affect anything in IntelligibilityEnhancer. | 168 // Note: VAD currently does not affect anything in IntelligibilityEnhancer. |
| 169 VadInst* vad_high_; | 169 VadInst* vad_high_; |
| 170 VadInst* vad_low_; | 170 VadInst* vad_low_; |
| 171 rtc::scoped_ptr<int16_t[]> vad_tmp_buffer_; | 171 rtc::scoped_ptr<int16_t[]> vad_tmp_buffer_; |
| 172 bool has_voice_low_; // Whether voice detected in speech stream. | 172 bool has_voice_low_; // Whether voice detected in speech stream. |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace webrtc | 175 } // namespace webrtc |
| 176 | 176 |
| 177 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_ENHAN
CER_H_ | 177 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_ENHAN
CER_H_ |
| OLD | NEW |