Clang Format Cleanup
This commit is contained in:
@@ -24,9 +24,10 @@ typedef struct {
|
||||
// block of samples
|
||||
int (*play)(void *buf, int samples);
|
||||
void (*stop)(void);
|
||||
|
||||
|
||||
// may be null if no implemented
|
||||
int (*is_running)(void); // if implemented, will return 0 if everything is okay, non-zero otherwise
|
||||
int (*is_running)(
|
||||
void); // if implemented, will return 0 if everything is okay, non-zero otherwise
|
||||
|
||||
// may be null if not implemented
|
||||
void (*flush)(void);
|
||||
|
||||
+1
-1
@@ -1005,7 +1005,7 @@ static int play(void *buf, int samples) {
|
||||
measurement_time = get_absolute_time_in_fp();
|
||||
frames_played_at_measurement_time = frames_sent_for_playing - fl;
|
||||
if (frame_index == start_measurement_from_this_frame) {
|
||||
debug(1,"Start frame counting");
|
||||
debug(1, "Start frame counting");
|
||||
frames_played_at_measurement_start_time = frames_played_at_measurement_time;
|
||||
measurement_start_time = measurement_time;
|
||||
measurement_data_is_valid = 1;
|
||||
|
||||
@@ -587,8 +587,6 @@ int config_set_lookup_bool(config_t *cfg, char *where, int *dst) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void command_set_volume(double volume) {
|
||||
if (config.cmd_set_volume) {
|
||||
/*Spawn a child to run the program.*/
|
||||
|
||||
@@ -206,7 +206,8 @@ typedef struct {
|
||||
#ifdef CONFIG_JACK
|
||||
char *jack_client_name, *jack_left_channel_name, *jack_right_channel_name;
|
||||
int jack_auto_client_open_interval; // will try to open a client automatically every second
|
||||
int jack_auto_client_disconnect; // will disconnect from the server on end of session if set, normally clear.
|
||||
int jack_auto_client_disconnect; // will disconnect from the server on end of session if set,
|
||||
// normally clear.
|
||||
#endif
|
||||
|
||||
} shairport_cfg;
|
||||
|
||||
@@ -835,14 +835,14 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
|
||||
debug_mutex_unlock(&conn->flush_mutex, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (config.output->is_running)
|
||||
if (config.output->is_running() !=0 ) { // if the back end isn't running for any reason
|
||||
debug(3,"not running");
|
||||
if (config.output->is_running() != 0) { // if the back end isn't running for any reason
|
||||
debug(3, "not running");
|
||||
debug_mutex_lock(&conn->flush_mutex, 1000, 1);
|
||||
conn->flush_requested = 1;
|
||||
debug_mutex_unlock(&conn->flush_mutex, 3);
|
||||
}
|
||||
}
|
||||
|
||||
debug_mutex_lock(&conn->flush_mutex, 1000, 1);
|
||||
if (conn->flush_requested == 1) {
|
||||
@@ -907,7 +907,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
|
||||
// player
|
||||
int have_sent_prefiller_silence = 1; // set true when we have sent some silent frames to
|
||||
// the DAC
|
||||
/*
|
||||
/*
|
||||
int64_t reference_timestamp;
|
||||
uint64_t reference_timestamp_time, remote_reference_timestamp_time;
|
||||
get_reference_timestamp_stuff(&reference_timestamp, &reference_timestamp_time,
|
||||
@@ -991,7 +991,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
|
||||
&should_be_time, conn);
|
||||
|
||||
conn->first_packet_time_to_play = should_be_time;
|
||||
|
||||
|
||||
// now, the size of the initial silence must be affected by the lead-in time.
|
||||
// it must be somewhat less than the lead-in time so that dynamic adjustments can be
|
||||
// made
|
||||
@@ -1175,11 +1175,15 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
|
||||
|
||||
// here, get the time to play the current frame.
|
||||
|
||||
if (have_timestamp_timing_information(conn)) { // if we have a reference time
|
||||
if (have_timestamp_timing_information(conn)) { // if we have a reference time
|
||||
|
||||
uint64_t time_to_play;
|
||||
frame_to_local_time(curframe->timestamp + conn->latency * conn->output_sample_ratio + (int64_t)(config.audio_backend_latency_offset * config.output_rate) - config.audio_backend_buffer_desired_length * config.output_rate, &time_to_play, conn);
|
||||
|
||||
frame_to_local_time(
|
||||
curframe->timestamp + conn->latency * conn->output_sample_ratio +
|
||||
(int64_t)(config.audio_backend_latency_offset * config.output_rate) -
|
||||
config.audio_backend_buffer_desired_length * config.output_rate,
|
||||
&time_to_play, conn);
|
||||
|
||||
if (local_time_now >= time_to_play) {
|
||||
do_wait = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user