#ifndef __AUDIO_EFFECT_H__
#define __AUDIO_EFFECT_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stddef.h>
typedef struct audio_effect_interface audio_effect_interface_s;
void audio_effect_destroy(audio_effect_s *ae);
size_t audio_effect_get_process_framesize(audio_effect_s *ae);
+#ifdef __cplusplus
+}
#endif
+
+#endif // __AUDIO_EFFECT_H__
#ifndef __AUDIO_EFFECT_INTERFACE_H__
#define __AUDIO_EFFECT_INTERFACE_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "audio_effect.h"
typedef void *(*dl_create_t)(int, int, audio_effect_format_e, size_t);
#define PLUGIN_ENTRY_POINT __audio_effect_plugin_entry_point__
#define PLUGIN_ENTRY_POINT_DEFINE_FUNC(s) \
- audio_effect_plugin_info_s *PLUGIN_ENTRY_POINT(void) { return &s; } \
+ audio_effect_plugin_info_s *PLUGIN_ENTRY_POINT(void) { return &s; }
#define PLUGIN_CONVERT_TO_STRING(X) #X
#define PLUGIN_ENTRY_POINT_CONVERT(X) PLUGIN_CONVERT_TO_STRING(X)
#define PLUGIN_ENTRY_POINT_STRING PLUGIN_ENTRY_POINT_CONVERT(PLUGIN_ENTRY_POINT)
+#ifdef __cplusplus
+}
#endif
+#endif // __AUDIO_EFFECT_INTERFACE_H__
+
#ifndef __AUDIO_EFFECT_LOG_H__
#define __AUDIO_EFFECT_LOG_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef USE_DLOG
#include <dlog.h>
#ifdef LOG_TAG
#define LOG_VERBOSE(...) { printf(__VA_ARGS__); printf("\n"); }
#endif
+#ifdef __cplusplus
+}
#endif
+
+#endif // __AUDIO_EFFECT_LOG_H__
#ifndef __AUDIO_EFFECT_UTIL_H__
#define __AUDIO_EFFECT_UTIL_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <audio_effect.h>
size_t audio_effect_util_get_sample_size(audio_effect_format_e format);
void audio_effect_util_interleave(const void **src, void *dst, int channels, size_t sample_size, size_t frames);
void audio_effect_util_deinterleave(const void *src, void **dst, int channels, size_t sample_size, size_t frames);
+#ifdef __cplusplus
+}
#endif
+
+#endif // __AUDIO_EFFECT_UTIL_H__
Name: libaudio-effect
Summary: audio effect library
-Version: 0.0.10
+Version: 0.0.11
Release: 0
Group: System/Libraries
License: Apache-2.0
#include <assert.h>
#include <webrtc/modules/audio_processing/include/audio_processing.h>
-extern "C" {
#include <audio_effect_interface.h>
#include <audio_effect_util.h>
#include <audio_effect_log.h>
-audio_effect_plugin_info_s *__audio_effect_plugin_entry_point__(void);
-}
-
#define FIXED_FRAME_SIZE_MSEC 10
#define CHANNELS_MAX 2
},
};
-PLUGIN_ENTRY_POINT_DEFINE_FUNC(aec_webrtc_desc);
-
+extern "C" PLUGIN_ENTRY_POINT_DEFINE_FUNC(aec_webrtc_desc);
};
PLUGIN_ENTRY_POINT_DEFINE_FUNC(agc_speex_desc);
-
};
PLUGIN_ENTRY_POINT_DEFINE_FUNC(amplify_desc);
-
float *buffer;
};
-static audio_effect_plugin_info_s ns_rnnoise_desc;
-
static void *ns_rnnoise_create(int rate, int channels, audio_effect_format_e format, size_t frames)
{
struct userdata *u;
};
PLUGIN_ENTRY_POINT_DEFINE_FUNC(ns_rnnoise_desc);
-
/* framesize could be 960 in case of 48K (16K 320) */
u->frames = (size_t)frame_size;
u->buffer = (float *)malloc(sizeof(float) * u->frames);
+
ns_srid_desc.constraint.frames = u->frames;
noise_suppression_set_level(u->handle, NOISE_SUPPRESSION_LEVEL_MID);
};
PLUGIN_ENTRY_POINT_DEFINE_FUNC(ns_srid_desc);
-
};
PLUGIN_ENTRY_POINT_DEFINE_FUNC(reference_copy_desc);
-