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.
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef CONFIG_AIRPLAY_2
|
||||
// #include "plist_xml_strings.h"
|
||||
#include "ptp-utilities.h"
|
||||
@@ -56,6 +57,11 @@
|
||||
#include <sodium.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONVOLUTION
|
||||
#include "FFTConvolver/convolver.h"
|
||||
#endif
|
||||
|
||||
|
||||
struct Nvll {
|
||||
char *name;
|
||||
double value;
|
||||
@@ -2484,6 +2490,9 @@ void *rtp_buffered_audio_processor(void *arg) {
|
||||
// 0; // This may be set to 1 by a flush, so don't zero it during start.
|
||||
packets_played_in_this_sequence = 0;
|
||||
new_buffer_needed = 0;
|
||||
#ifdef CONFIG_CONVOLUTION
|
||||
convolver_clear_state();
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((play_enabled == 0) && (conn->ap2_play_enabled != 0)) {
|
||||
|
||||
Reference in New Issue
Block a user