Remove redundant flags, add one new one and remove some commented out junk.

This commit is contained in:
Mike Brady
2026-08-02 09:37:08 +01:00
parent 4c4f18d285
commit 7f8a23b518
+8 -24
View File
@@ -213,6 +213,7 @@ typedef struct {
char *pa_sink; // the name (or id) of the sink that Shairport Sync will play on. char *pa_sink; // the name (or id) of the sink that Shairport Sync will play on.
#endif #endif
#ifdef CONFIG_PIPEWIRE #ifdef CONFIG_PIPEWIRE
char *pw_application_name; // the name under which Shairport Sync shows up as an "Application" in char *pw_application_name; // the name under which Shairport Sync shows up as an "Application" in
// the Sound Preferences in most desktop Linuxes. // the Sound Preferences in most desktop Linuxes.
@@ -221,6 +222,7 @@ typedef struct {
char *pw_node_name; // defaults to the application's name, usually "shairport-sync". char *pw_node_name; // defaults to the application's name, usually "shairport-sync".
char *pw_sink_target; // leave this unset if you don't want to change the sink_target. char *pw_sink_target; // leave this unset if you don't want to change the sink_target.
#endif #endif
#ifdef CONFIG_METADATA #ifdef CONFIG_METADATA
int metadata_enabled; int metadata_enabled;
char *metadata_pipename; char *metadata_pipename;
@@ -230,6 +232,7 @@ typedef struct {
int get_coverart; int get_coverart;
double metadata_progress_interval; // 0 means no progress reports double metadata_progress_interval; // 0 means no progress reports
#endif #endif
#ifdef CONFIG_MQTT #ifdef CONFIG_MQTT
int mqtt_enabled; int mqtt_enabled;
char *mqtt_hostname; char *mqtt_hostname;
@@ -250,6 +253,7 @@ typedef struct {
char *mqtt_autodiscovery_prefix; char *mqtt_autodiscovery_prefix;
char *mqtt_empty_payload_substitute; char *mqtt_empty_payload_substitute;
#endif #endif
uint8_t ap1_prefix[6]; uint8_t ap1_prefix[6];
uint8_t hw_addr[8]; // only needs 6 but 8 is handy when converting this to a number uint8_t hw_addr[8]; // only needs 6 but 8 is handy when converting this to a number
int port; int port;
@@ -302,8 +306,6 @@ typedef struct {
// to be enabled under the auto setting // to be enabled under the auto setting
int decoders_supported; int decoders_supported;
int decoder_in_use; int decoder_in_use;
// char *logfile;
// char *errfile;
char *configfile; char *configfile;
char *regtype; // The regtype is the service type followed by the protocol, separated by a dot, by char *regtype; // The regtype is the service type followed by the protocol, separated by a dot, by
// default “_raop._tcp.” for AirPlay 1. // default “_raop._tcp.” for AirPlay 1.
@@ -348,17 +350,11 @@ typedef struct {
#ifdef CONFIG_CONVOLUTION #ifdef CONFIG_CONVOLUTION
int convolution_enabled; int convolution_enabled;
unsigned int convolution_rate; // 0 means the convolver has never been initialised, so ignore
// convolver_valid.
// but if this is the same as the current rate and convolver_valid is false, it means that an
// attempt to initialise the convolver has failed.
size_t convolution_block_size;
unsigned int convolution_ir_file_count; unsigned int convolution_ir_file_count;
ir_file_info_t *convolution_ir_files; // NULL or an array of information about all the impulse ir_file_info_t *convolution_ir_files; // NULL or an array of information about all the impulse
// response files loaded // response files loaded
int convolution_ir_files_updated; // set to true if the convolution_ir_files are changed. Cleared int convolution_ir_files_updated; // set to true if the convolution_ir_files are changed. Cleared
// when the convolver has been initialised // when the convolver has been initialised
int convolver_valid; // set to true if the convolver can be initialised
unsigned int convolution_threads; // number of threads in the convolver thread pool unsigned int convolution_threads; // number of threads in the convolver thread pool
float convolution_gain; float convolution_gain;
double convolution_max_length_in_seconds; double convolution_max_length_in_seconds;
@@ -385,6 +381,7 @@ typedef struct {
int scan_max_inactive_count; // number of scans to do before stopping if not made active again int scan_max_inactive_count; // number of scans to do before stopping if not made active again
// (about 15 minutes worth) // (about 15 minutes worth)
#endif #endif
int disable_resend_requests; // set this to stop resend request being made for missing packets int disable_resend_requests; // set this to stop resend request being made for missing packets
double diagnostic_drop_packet_fraction; // pseudo randomly drop this fraction of packets, for double diagnostic_drop_packet_fraction; // pseudo randomly drop this fraction of packets, for
// debugging. Currently audio packets only... // debugging. Currently audio packets only...
@@ -395,10 +392,11 @@ typedef struct {
int jack_soxr_resample_quality; int jack_soxr_resample_quality;
#endif #endif
#endif #endif
void *gradients; // a linked list of the clock gradients discovered for all DACP IDs void *gradients; // a linked list of the clock gradients discovered for all DACP IDs
// can't use IP numbers as they might be given to different devices // can't use IP numbers as they might be given to different devices
// can't get hold of MAC addresses. // can't get hold of MAC addresses.
// can't define the nvll linked list struct here // can't define the null linked list struct here
char *firmware_version; char *firmware_version;
// use these in information requests // use these in information requests
char *model; char *model;
@@ -440,6 +438,7 @@ typedef struct {
#if defined(CONFIG_DBUS_INTERFACE) #if defined(CONFIG_DBUS_INTERFACE)
dbus_message_bus_t dbus_service_bus_type; dbus_message_bus_t dbus_service_bus_type;
#endif #endif
#if defined(CONFIG_MPRIS_INTERFACE) #if defined(CONFIG_MPRIS_INTERFACE)
dbus_message_bus_t mpris_service_bus_type; dbus_message_bus_t mpris_service_bus_type;
#endif #endif
@@ -452,21 +451,6 @@ uint32_t nctohl(const uint8_t *p); // read 4 characters from *p and do ntohl on
uint16_t nctohs(const uint8_t *p); // read 2 characters from *p and do ntohs on them uint16_t nctohs(const uint8_t *p); // read 2 characters from *p and do ntohs on them
uint64_t nctoh64(const uint8_t *p); // read 8 characters from *p to a uint64_t uint64_t nctoh64(const uint8_t *p); // read 8 characters from *p to a uint64_t
// void memory_barrier();
/*
void log_to_stderr(); // call this to direct logging to stderr;
void log_to_stdout(); // call this to direct logging to stdout;
void log_to_syslog(); // call this to direct logging to the system log;
void log_to_file(); // call this to direct logging to a file or (pre-existing) pipe;
*/
// true if Shairport Sync is supposed to be sending output to the output device, false otherwise
//int get_requested_connection_state_to_output();
// void set_requested_connection_state_to_output(int v);
int try_to_open_pipe_for_writing( int try_to_open_pipe_for_writing(
const char *pathname); // open it without blocking if it's not hooked up const char *pathname); // open it without blocking if it's not hooked up