diff --git a/src/input.c b/src/input.c index 834baabe..aa062318 100644 --- a/src/input.c +++ b/src/input.c @@ -49,7 +49,7 @@ // How long (in sec) to keep an input open without the player reading from it #define INPUT_OPEN_TIMEOUT 600 -#define DEBUG 1 //TODO disable +//#define DEBUG_INPUT 1 extern struct input_definition input_file; extern struct input_definition input_http; @@ -139,7 +139,7 @@ static struct timespec input_loop_timeout = { INPUT_LOOP_TIMEOUT, 0 }; static struct timeval input_open_timeout = { INPUT_OPEN_TIMEOUT, 0 }; static struct event *input_open_timeout_ev; -#ifdef DEBUG +#ifdef DEBUG_INPUT static size_t debug_elapsed; #endif @@ -352,7 +352,7 @@ flush(short *flags) pthread_mutex_unlock(&input_buffer.mutex); -#ifdef DEBUG +#ifdef DEBUG_INPUT DPRINTF(E_DBG, L_PLAYER, "Flushing %zu bytes with flags %d\n", len, *flags); #endif } @@ -697,7 +697,7 @@ input_read(void *data, size_t size, short *flag, void **flagdata) input_buffer.bytes_read += len; -#ifdef DEBUG +#ifdef DEBUG_INPUT // Logs if flags present or each 10 seconds if (*flag & INPUT_FLAG_QUALITY) diff --git a/src/outputs/alsa.c b/src/outputs/alsa.c index 831603d5..d076b74d 100644 --- a/src/outputs/alsa.c +++ b/src/outputs/alsa.c @@ -47,7 +47,7 @@ // If latency is jumping up and down we don't do compensation since we probably // wouldn't do a good job. We use linear regression to determine the trend, but // if r2 is below this value we won't attempt to correct sync. -#define ALSA_MAX_VARIANCE 0.2 +#define ALSA_MAX_VARIANCE 0.3 // We correct latency by adjusting the sample rate in steps. However, if the // latency keeps drifting we give up after reaching this step. diff --git a/src/player.c b/src/player.c index 9c68442f..1054b189 100644 --- a/src/player.c +++ b/src/player.c @@ -110,12 +110,6 @@ // (value is in milliseconds) #define PLAYER_WRITE_BEHIND_MAX 1500 -// When we pause, we keep the input open, but we can't do that forever. We must -// think of the poor streaming servers, for instance. This timeout determines -// how long we stay paused, before we close the inputs. -// (value is in seconds) -#define PLAYER_PAUSE_TIMEOUT 600 - //#define DEBUG_PLAYER 1 struct volume_param { @@ -273,8 +267,6 @@ static struct timespec player_tick_interval; // Timer resolution static struct timespec player_timer_res; -//static struct timeval player_pause_timeout = { PLAYER_PAUSE_TIMEOUT, 0 }; - // PLAYER_WRITE_BEHIND_MAX converted to clock ticks static int pb_write_deficit_max; @@ -939,8 +931,6 @@ event_play_eof() if (consume) db_queue_delete_byitemid(pb_session.playing_now->item_id); -// outputs_metadata_prune(pb_session.pos); - if (pb_session.reading_next) outputs_metadata_send(pb_session.reading_next->item_id, false, metadata_finalize_cb);