From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sat, 14 Jan 2023 12:53:20 +0000 (+0000) Subject: Clang format X-Git-Tag: 4.2.1d0~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2ca8c84a415c85b3625afcb4e2e0e654d8d8783;p=thirdparty%2Fshairport-sync.git Clang format --- diff --git a/common.h b/common.h index 93f04ec6..298bdbd0 100644 --- a/common.h +++ b/common.h @@ -169,11 +169,12 @@ typedef struct { int ignore_volume_control; int volume_max_db_set; // set to 1 if a maximum volume db has been set int volume_max_db; - int no_sync; // disable synchronisation, even if it's available - int no_mmap; // disable use of mmap-based output, even if it's available - double resync_threshold; // if it gets out of whack by more than this number of seconds, do a resync. - // if zero, never do a resync. - double resync_recovery_time; // if sync is late, drop the delay but also drop the following frames up to the resync_recovery_time + int no_sync; // disable synchronisation, even if it's available + int no_mmap; // disable use of mmap-based output, even if it's available + double resync_threshold; // if it gets out of whack by more than this number of seconds, do a + // resync. if zero, never do a resync. + double resync_recovery_time; // if sync is late, drop the delay but also drop the following frames + // up to the resync_recovery_time int allow_session_interruption; int timeout; // while in play mode, exit if no packets of audio come in for more than this number // of seconds . Zero means never exit. diff --git a/player.c b/player.c index 293bde26..21107ecb 100644 --- a/player.c +++ b/player.c @@ -2645,8 +2645,9 @@ void *player_thread_func(void *arg) { conn->connection_number); } } else { - if ((resp != -EBUSY) && (resp != -ENODEV)) // delay and not-there errors can be reported if the device is (hopefully - // temporarily) busy or unavailable + if ((resp != -EBUSY) && + (resp != -ENODEV)) // delay and not-there errors can be reported if the device + // is (hopefully temporarily) busy or unavailable debug(1, "Delay error %d when checking running latency.", resp); } } @@ -2832,7 +2833,8 @@ void *player_thread_func(void *arg) { source_frames_to_drop = source_frames_to_drop / conn->output_sample_ratio; // drop some extra frames to give the pipeline a chance to recover - int64_t extra_frames_to_drop = (int64_t)(conn->input_rate * config.resync_recovery_time); + int64_t extra_frames_to_drop = + (int64_t)(conn->input_rate * config.resync_recovery_time); source_frames_to_drop += extra_frames_to_drop; uint32_t frames_to_drop = source_frames_to_drop; diff --git a/shairport.c b/shairport.c index b5ecd030..4b2129cc 100644 --- a/shairport.c +++ b/shairport.c @@ -1986,15 +1986,14 @@ int main(int argc, char **argv) { config.debugger_show_file_and_line = 1; // by default, log the file and line of the originating message config.debugger_show_relative_time = - 1; // by default, log the time back to the previous debug message + 1; // by default, log the time back to the previous debug message config.timeout = 120; // this number of seconds to wait for [more] audio before switching to idle. config.buffer_start_fill = 220; - - config.resync_threshold = 0.050; // default + + config.resync_threshold = 0.050; // default config.resync_recovery_time = 0.1; // drop this amount of frames following the resync delay. config.tolerance = 0.002; - #ifdef CONFIG_AIRPLAY_2 config.timeout = 0; // disable watchdog config.port = 7000; @@ -2374,9 +2373,8 @@ int main(int argc, char **argv) { debug(1, "mdns backend \"%s\".", strnull(config.mdns_name)); debug(2, "userSuppliedLatency is %d.", config.userSuppliedLatency); debug(1, "interpolation setting is \"%s\".", - config.packet_stuffing == ST_basic ? "basic" - : config.packet_stuffing == ST_soxr ? "soxr" - : "auto"); + config.packet_stuffing == ST_basic ? "basic" + : config.packet_stuffing == ST_soxr ? "soxr" : "auto"); debug(1, "interpolation soxr_delay_threshold is %d.", config.soxr_delay_threshold); debug(1, "resync time is %f seconds.", config.resync_threshold); debug(1, "resync recovery time is %f seconds.", config.resync_recovery_time);