2 * Copyright (c) 2022-2023 Samsung Electronics Co., Ltd.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * - Neither the name of the Samsung Electronics Co., Ltd. nor the names
16 * of its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
23 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 #ifndef __NOISE_SUPPRESSION_H__
33 #define __NOISE_SUPPRESSION_H__
35 #include <noise-suppression-type.h>
40 #endif /* __cplusplus */
43 NOISE_SUPPRESSION_LEVEL_VERY_LOW,
44 NOISE_SUPPRESSION_LEVEL_LOW,
45 NOISE_SUPPRESSION_LEVEL_MID,
46 NOISE_SUPPRESSION_LEVEL_HIGH,
47 NOISE_SUPPRESSION_LEVEL_VERY_HIGH
48 } noise_suppression_level_e;
50 int noise_suppression_initialize(noise_suppression_log_cb cb,
51 const unsigned int input_sample_rate,
52 const unsigned int allowed_delay_msec,
53 noise_suppression_h *handle, unsigned int *frame_size);
55 void noise_suppression_deinitialize(noise_suppression_h handle);
57 int noise_suppression_set_level(noise_suppression_h handle,
58 noise_suppression_level_e level);
60 int noise_suppression_process_audio(noise_suppression_h handle,
61 const float *in, float *out);
65 #endif /* __cplusplus */
67 #endif /* __NOISE_SUPPRESSION_H__ */