Files
shairport-sync/FFTConvolver/convolver.h
T
Mike Brady d043f98330 Update the convolution code:
(1) to be multithreaded,
    (2) to work on multichannel audio and
    (3) to work on 48k and 44.1k audio.

    Allow multiple impulse response (IR) files with a new setting: "convolution_ir_files"
    When convolution starts, Shairport Sync will look for an IR file with a sample rate
    matching the input (44.1k or 48k) and channel count.
    If one can't be found, it will look for a single-channel IR file with the same rate.
    It will always choose the first match in the file list supplied "convolution_ir_files".

    Allow multithreading -- use the "convolution_thread_pool_size" to set the number of threads to use.

    Deprecate "convolution" -- use "convolution_enabled" instead.
    Deprecate "convolution_max_length" -- use "convolution_max_length_in_seconds" instead.
    Deprecate "convolution_ir_file" -- use "convolution_ir_files" instead.
    Update corresponding D-Bus methods and properties.

Update the loudness code to work on 48k and well as 44.1k audio and with multichannel audio.

    Deprecate "loudness" -- use "loudness_enabled" instead.
    Update corresponding D-Bus methods and properties.

Fix a deprecated FFmpeg warning.

Update HiFi-LoFi FFT convolver to latest available.
2025-10-13 13:26:20 +01:00

27 lines
849 B
C

// C wrapper to C++ FFTConvolver
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
// int convolver_init(const char* file, unsigned char channel_count, double max_length_in_seconds, size_t block_size);
void convolver_reset();
//void convolver_clear_state();
// void convolver_process(unsigned int channel, float *data, int length);
// void convolver_process_l(float* data, int length);
// void convolver_process_r(float* data, int length);
void convolver_pool_init(size_t numThreads, size_t numConvolvers);
void convolver_pool_closedown();
int convolver_init(const char* file, unsigned char channel_count, double max_length_in_seconds, size_t block_size);
void convolver_process(unsigned int channel, float *data, int length);
void convolver_clear_state();
void convolver_wait_for_all();
#ifdef __cplusplus
}
#endif