Use full form rather than abbreviations
[platform/core/multimedia/noise-suppression.git] / include / noise-suppression.h
1 /**
2  * Copyright (c) 2022-2023 Samsung Electronics Co., Ltd.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * - Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
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.
14  *
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.
18  *
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.
30  */
31
32 #ifndef __NOISE_SUPPRESSION_H__
33 #define __NOISE_SUPPRESSION_H__
34
35 #include <noise-suppression-type.h>
36
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif /* __cplusplus */
41
42 typedef enum {
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;
49
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);
54
55 void noise_suppression_deinitialize(noise_suppression_h handle);
56
57 int noise_suppression_set_level(noise_suppression_h handle,
58                 noise_suppression_level_e level);
59
60 int noise_suppression_process_audio(noise_suppression_h handle,
61                 const float *in, float *out);
62
63 #ifdef __cplusplus
64 }
65 #endif /* __cplusplus */
66
67 #endif /* __NOISE_SUPPRESSION_H__ */