- Created a new SIMD interface header and source files for audio processing functions. - Implemented functions for filling buffers, mixing audio, applying gain, calculating RMS and peak values, normalizing audio, converting stereo to mono, limiting audio, fading audio, and a simple equalizer. - Added SSE-specific implementations for the audio processing functions to leverage SIMD for performance improvements. - Updated CMakeLists.txt files to include new libraries and link dependencies for the SIMD interface and SSE implementations. - Introduced a static test helper library for unit testing with Google Test framework.
17 lines
1.1 KiB
C
17 lines
1.1 KiB
C
#pragma once
|
|
|
|
#include "simd_export.h"
|
|
#include <cstddef>
|
|
|
|
extern "C" {
|
|
SIMD_EXPORT void fill_buffer(float* buffer, float value, size_t num_samples);
|
|
SIMD_EXPORT void mix_audio(const float* src1, const float* src2, float* dst, size_t num_samples);
|
|
SIMD_EXPORT void apply_gain(const float* src, float* dst, float gain, size_t num_samples);
|
|
SIMD_EXPORT float calculate_rms(const float* src, size_t num_samples);
|
|
SIMD_EXPORT float calculate_peak(const float* src, size_t num_samples);
|
|
SIMD_EXPORT void normalize_audio(const float* src, float* dst, float target_peak, size_t num_samples);
|
|
SIMD_EXPORT void stereo_to_mono(const float* stereo_src, float* mono_dst, size_t num_stereo_samples);
|
|
SIMD_EXPORT void limit_audio(const float* src, float* dst, float threshold, float* limiter_state, float sample_rate, size_t num_samples);
|
|
SIMD_EXPORT void fade_audio(const float* src, float* dst, size_t fade_in_samples, size_t fade_out_samples, size_t num_samples);
|
|
SIMD_EXPORT void simple_eq(const float* src, float* dst, float low_gain, float mid_gain, float high_gain, float* eq_state, size_t num_samples);
|
|
} |