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 |
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_H_ |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_H_ |
13 | 13 |
| 14 #include <stddef.h> |
| 15 |
14 #include "webrtc/typedefs.h" | 16 #include "webrtc/typedefs.h" |
15 | 17 |
16 typedef struct NsHandleT NsHandle; | 18 typedef struct NsHandleT NsHandle; |
17 | 19 |
18 #ifdef __cplusplus | 20 #ifdef __cplusplus |
19 extern "C" { | 21 extern "C" { |
20 #endif | 22 #endif |
21 | 23 |
22 /* | 24 /* |
23 * This function creates an instance of the floating point Noise Suppression. | 25 * This function creates an instance of the floating point Noise Suppression. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 * - NS_inst : Noise suppression instance. | 87 * - NS_inst : Noise suppression instance. |
86 * - spframe : Pointer to speech frame buffer for each band | 88 * - spframe : Pointer to speech frame buffer for each band |
87 * - num_bands : Number of bands | 89 * - num_bands : Number of bands |
88 * | 90 * |
89 * Output: | 91 * Output: |
90 * - NS_inst : Updated NS instance | 92 * - NS_inst : Updated NS instance |
91 * - outframe : Pointer to output frame for each band | 93 * - outframe : Pointer to output frame for each band |
92 */ | 94 */ |
93 void WebRtcNs_Process(NsHandle* NS_inst, | 95 void WebRtcNs_Process(NsHandle* NS_inst, |
94 const float* const* spframe, | 96 const float* const* spframe, |
95 int num_bands, | 97 size_t num_bands, |
96 float* const* outframe); | 98 float* const* outframe); |
97 | 99 |
98 /* Returns the internally used prior speech probability of the current frame. | 100 /* Returns the internally used prior speech probability of the current frame. |
99 * There is a frequency bin based one as well, with which this should not be | 101 * There is a frequency bin based one as well, with which this should not be |
100 * confused. | 102 * confused. |
101 * | 103 * |
102 * Input | 104 * Input |
103 * - handle : Noise suppression instance. | 105 * - handle : Noise suppression instance. |
104 * | 106 * |
105 * Return value : Prior speech probability in interval [0.0, 1.0]. | 107 * Return value : Prior speech probability in interval [0.0, 1.0]. |
106 * -1 - NULL pointer or uninitialized instance. | 108 * -1 - NULL pointer or uninitialized instance. |
107 */ | 109 */ |
108 float WebRtcNs_prior_speech_probability(NsHandle* handle); | 110 float WebRtcNs_prior_speech_probability(NsHandle* handle); |
109 | 111 |
110 #ifdef __cplusplus | 112 #ifdef __cplusplus |
111 } | 113 } |
112 #endif | 114 #endif |
113 | 115 |
114 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_H_ | 116 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_H_ |
OLD | NEW |