From 7f8a23b51867cde212e9a8d19ad4a336284255a4 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 2 Aug 2026 09:37:08 +0100 Subject: [PATCH] Remove redundant flags, add one new one and remove some commented out junk. --- common.h | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/common.h b/common.h index 772da08a..11a10fc0 100644 --- a/common.h +++ b/common.h @@ -213,6 +213,7 @@ typedef struct { char *pa_sink; // the name (or id) of the sink that Shairport Sync will play on. #endif + #ifdef CONFIG_PIPEWIRE char *pw_application_name; // the name under which Shairport Sync shows up as an "Application" in // 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_sink_target; // leave this unset if you don't want to change the sink_target. #endif + #ifdef CONFIG_METADATA int metadata_enabled; char *metadata_pipename; @@ -230,6 +232,7 @@ typedef struct { int get_coverart; double metadata_progress_interval; // 0 means no progress reports #endif + #ifdef CONFIG_MQTT int mqtt_enabled; char *mqtt_hostname; @@ -250,6 +253,7 @@ typedef struct { char *mqtt_autodiscovery_prefix; char *mqtt_empty_payload_substitute; #endif + uint8_t ap1_prefix[6]; uint8_t hw_addr[8]; // only needs 6 but 8 is handy when converting this to a number int port; @@ -302,8 +306,6 @@ typedef struct { // to be enabled under the auto setting int decoders_supported; int decoder_in_use; - // char *logfile; - // char *errfile; char *configfile; char *regtype; // The regtype is the service type followed by the protocol, separated by a dot, by // default “_raop._tcp.” for AirPlay 1. @@ -348,17 +350,11 @@ typedef struct { #ifdef CONFIG_CONVOLUTION 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; ir_file_info_t *convolution_ir_files; // NULL or an array of information about all the impulse // response files loaded int convolution_ir_files_updated; // set to true if the convolution_ir_files are changed. Cleared // 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 float convolution_gain; 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 // (about 15 minutes worth) #endif + 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 // debugging. Currently audio packets only... @@ -395,10 +392,11 @@ typedef struct { int jack_soxr_resample_quality; #endif #endif + 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 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; // use these in information requests char *model; @@ -440,6 +438,7 @@ typedef struct { #if defined(CONFIG_DBUS_INTERFACE) dbus_message_bus_t dbus_service_bus_type; #endif + #if defined(CONFIG_MPRIS_INTERFACE) dbus_message_bus_t mpris_service_bus_type; #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 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( const char *pathname); // open it without blocking if it's not hooked up