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_NOISE_SUPPRESSION_X_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_ |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_ |
13 | 13 |
| 14 #include <stddef.h> |
| 15 |
14 #include "webrtc/typedefs.h" | 16 #include "webrtc/typedefs.h" |
15 | 17 |
16 typedef struct NsxHandleT NsxHandle; | 18 typedef struct NsxHandleT NsxHandle; |
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 fixed point Noise Suppression. | 25 * This function creates an instance of the fixed point Noise Suppression. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 * | 76 * |
75 * Output: | 77 * Output: |
76 * - nsxInst : Updated NSx instance | 78 * - nsxInst : Updated NSx instance |
77 * - outFrame : Pointer to output frame for each band | 79 * - outFrame : Pointer to output frame for each band |
78 */ | 80 */ |
79 void WebRtcNsx_Process(NsxHandle* nsxInst, | 81 void WebRtcNsx_Process(NsxHandle* nsxInst, |
80 const short* const* speechFrame, | 82 const short* const* speechFrame, |
81 int num_bands, | 83 int num_bands, |
82 short* const* outFrame); | 84 short* const* outFrame); |
83 | 85 |
| 86 /* Returns a pointer to the noise estimate per frequency bin. The number of |
| 87 * frequency bins can be provided using WebRtcNsx_num_freq(). |
| 88 * |
| 89 * Input |
| 90 * - nsxInst : NSx instance. Needs to be initiated before call. |
| 91 * |
| 92 * Return value : Pointer to the noise estimate per frequency bin. |
| 93 * Returns NULL if the input is a NULL pointer or an |
| 94 * uninitialized instance. |
| 95 */ |
| 96 const uint32_t* WebRtcNsx_noise_estimate(const NsxHandle* nsxInst); |
| 97 |
| 98 /* Returns the number of frequency bins, which is the length of the noise |
| 99 * estimate for example. |
| 100 * |
| 101 * Return value : Number of frequency bins. |
| 102 */ |
| 103 size_t WebRtcNsx_num_freq(); |
| 104 |
84 #ifdef __cplusplus | 105 #ifdef __cplusplus |
85 } | 106 } |
86 #endif | 107 #endif |
87 | 108 |
88 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_ | 109 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_ |
OLD | NEW |