#ifndef AEC3_WRAPPER_H
#define AEC3_WRAPPER_H

#ifdef __cplusplus
extern "C" {
#endif

#if defined(AEC3_STATIC)
    #define AEC3_API
#elif defined(_WIN32) || defined(_WIN64)
    #ifdef AEC3_WRAPPER_BUILDING
        #define AEC3_API __declspec(dllexport)
    #else
        #define AEC3_API __declspec(dllimport)
    #endif
#elif defined(__GNUC__) || defined(__clang__)
    #ifdef AEC3_WRAPPER_BUILDING
        #define AEC3_API __attribute__((visibility("default")))
    #else
        #define AEC3_API
    #endif
#else
    #define AEC3_API
#endif

typedef struct AEC3Instance    AEC3Instance;
typedef struct AEC3AudioBuffer AEC3AudioBuffer;
AEC3_API AEC3Instance* aec3_create(int sample_rate, int num_channels);
AEC3_API void aec3_destroy(AEC3Instance* instance);
AEC3_API AEC3AudioBuffer* aec3_get_render_buffer(AEC3Instance* instance);
AEC3_API AEC3AudioBuffer* aec3_get_capture_buffer(AEC3Instance* instance);
AEC3_API float* const* aec3_buffer_get_channels(AEC3AudioBuffer* buffer);
AEC3_API const float* const* aec3_buffer_get_channels_const(const AEC3AudioBuffer* buffer);
AEC3_API void aec3_buffer_split_into_frequency_bands(AEC3AudioBuffer* buffer);
AEC3_API void aec3_buffer_merge_frequency_bands(AEC3AudioBuffer* buffer);
AEC3_API void aec3_analyze_render(AEC3Instance* instance);
AEC3_API void aec3_analyze_capture(AEC3Instance* instance);
AEC3_API void aec3_apply_high_pass_filter(AEC3Instance* instance);
AEC3_API void aec3_process_capture(AEC3Instance* instance);
AEC3_API void aec3_set_stream_delay(AEC3Instance* instance, int delay_ms);

AEC3_API int aec3_get_sample_rate(const AEC3Instance* instance);
AEC3_API int aec3_get_num_channels(const AEC3Instance* instance);
AEC3_API int aec3_get_frame_size_per_channel(const AEC3Instance* instance);

#ifdef __cplusplus
}
#endif

#endif
