From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 26 Nov 2021 18:02:23 +0000 (+0000) Subject: Clang format X-Git-Tag: 4.1-rc1~24^2~367^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc5b8f1a1171b18e704283f98c3dd2bf8e4a08ca;p=thirdparty%2Fshairport-sync.git Clang format --- diff --git a/audio_alsa.c b/audio_alsa.c index 0910b9e7..f2e0b131 100644 --- a/audio_alsa.c +++ b/audio_alsa.c @@ -249,10 +249,10 @@ static int set_period_size_request, set_buffer_size_request; static uint64_t frames_sent_for_playing; - // set to true if there has been a discontinuity between the last reported frames_sent_for_playing - // and the present reported frames_sent_for_playing - // Not that it will be set when the device is opened, as any previous figures for frames_sent_for_playing - // (which Shairport Sync might hold) would be invalid. +// set to true if there has been a discontinuity between the last reported frames_sent_for_playing +// and the present reported frames_sent_for_playing +// Not that it will be set when the device is opened, as any previous figures for +// frames_sent_for_playing (which Shairport Sync might hold) would be invalid. static int frames_sent_break_occurred; static void help(void) { @@ -1660,8 +1660,8 @@ int stats(uint64_t *the_time, uint64_t *the_delay, uint64_t *frames_sent_to_dac) if (ret == 0) ret = frames_sent_break_occurred; // will be zero unless an error like an underrun occurred else - ret = 1; // just indicate there was some kind of a break - frames_sent_break_occurred = 0; // reset it. + ret = 1; // just indicate there was some kind of a break + frames_sent_break_occurred = 0; // reset it. if (frames_sent_to_dac != NULL) *frames_sent_to_dac = frames_sent_for_playing; debug_mutex_unlock(&alsa_mutex, 0); @@ -1716,7 +1716,7 @@ int do_play(void *buf, int samples) { frames_sent_for_playing += samples; } else { frames_sent_break_occurred = 1; // note than an output error has occurred - if (ret == -EPIPE) { /* underrun */ + if (ret == -EPIPE) { /* underrun */ // It could be that the DAC was in the SND_PCM_STATE_XRUN state before // sending the samples to be output. If so, it will still be in @@ -1790,7 +1790,7 @@ int do_open(int do_auto_setup) { // do_mute(0); // complete unmute } frames_sent_break_occurred = 1; // there is a discontinuity with - // any previously-reported frame count + // any previously-reported frame count frames_sent_for_playing = 0; alsa_backend_state = abm_connected; // only do this if it really opened it. } diff --git a/player.c b/player.c index 0991167c..5e6e4133 100644 --- a/player.c +++ b/player.c @@ -2339,7 +2339,9 @@ void *player_thread_func(void *arg) { uint64_t actual_delay; stats_status = config.output->stats(&measurement_time, &actual_delay, &frames_sent_for_play); - // debug(1,"status: %d, actual_delay: %" PRIu64 ", frames_sent_for_play: %" PRIu64 ", frames_played: %" PRIu64 ".", stats_status, actual_delay, frames_sent_for_play, frames_sent_for_play - actual_delay); + // debug(1,"status: %d, actual_delay: %" PRIu64 ", frames_sent_for_play: %" PRIu64 ", + // frames_played: %" PRIu64 ".", stats_status, actual_delay, frames_sent_for_play, + // frames_sent_for_play - actual_delay); uint64_t frames_played = frames_sent_for_play - actual_delay; // If the status is zero, it means that there were no output problems since the // last time the stats call was made. Thus, the frame rate should be valid. @@ -2349,7 +2351,8 @@ void *player_thread_func(void *arg) { if (interval != 0) { conn->frame_rate = (1e9 * frames_played_in_this_interval) / interval; conn->frame_rate_valid = 1; - //debug(1,"frames_played_in_this_interval: %" PRIu64 ", interval: %" PRId64 ", rate: %f.", + // debug(1,"frames_played_in_this_interval: %" PRIu64 ", interval: %" PRId64 ", + // rate: %f.", // frames_played_in_this_interval, interval, conn->frame_rate); } }