Clang format

This commit is contained in:
Mike Brady
2021-11-26 18:02:23 +00:00
parent 7890188dcf
commit dc5b8f1a11
2 changed files with 13 additions and 10 deletions
+8 -8
View File
@@ -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.
}
+5 -2
View File
@@ -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);
}
}