From: Mike Brady Date: Sun, 27 Jan 2019 15:53:36 +0000 (+0000) Subject: Remove the preflight call - don't seem to need it. X-Git-Tag: 3.3RC0~66^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa5698fce22c20fc2dcc8e05b14e0c0c2a716e29;p=thirdparty%2Fshairport-sync.git Remove the preflight call - don't seem to need it. --- diff --git a/audio.h b/audio.h index 1767e416..a4f0f178 100644 --- a/audio.h +++ b/audio.h @@ -22,8 +22,6 @@ typedef struct { void (*start)(int sample_rate, int sample_format); // block of samples - int (*preflight)(void *buf, - int samples); // say you are about to send these samples (before interpolation) int (*play)(void *buf, int samples); void (*stop)(void); diff --git a/audio_alsa.c b/audio_alsa.c index e9ac05f9..7fae429b 100644 --- a/audio_alsa.c +++ b/audio_alsa.c @@ -48,7 +48,6 @@ static int init(int argc, char **argv); static void deinit(void); static void start(int i_sample_rate, int i_sample_format); static int play(void *buf, int samples); -int preflight(void *buf, int samples); static void stop(void); static void flush(void); int delay(long *the_delay); @@ -1308,15 +1307,6 @@ static void flush(void) { pthread_cleanup_pop(0); // release the mutex } -int preflight(__attribute__((unused)) void *buf, __attribute__((unused)) int samples) { - uint64_t time_now = - get_absolute_time_in_fp(); // this is to regulate access by the silence filler thread - uint64_t standoff_time = 60; // milliseconds - standoff_time = (standoff_time << 32) / 1000; - most_recent_write_time = time_now + standoff_time; - return 0; -} - static void stop(void) { // debug(2,"audio_alsa stop called."); flush(); // flush will also close the device if appropriate diff --git a/audio_ao.c b/audio_ao.c index 30f80d8d..42147bab 100644 --- a/audio_ao.c +++ b/audio_ao.c @@ -134,7 +134,6 @@ audio_output audio_ao = {.name = "ao", .is_running = NULL, .flush = NULL, .delay = NULL, - .preflight = NULL, .play = &play, .volume = NULL, .parameters = NULL, diff --git a/audio_dummy.c b/audio_dummy.c index 69518cd0..d8dea87f 100644 --- a/audio_dummy.c +++ b/audio_dummy.c @@ -65,7 +65,6 @@ audio_output audio_dummy = {.name = "dummy", .is_running = NULL, .flush = NULL, .delay = NULL, - .preflight = NULL, .play = &play, .volume = NULL, .parameters = NULL, diff --git a/audio_jack.c b/audio_jack.c index 9a584385..c8a8b9ee 100644 --- a/audio_jack.c +++ b/audio_jack.c @@ -66,7 +66,6 @@ audio_output audio_jack = {.name = "jack", .is_running = &jack_is_running, .flush = &jack_flush, .delay = &jack_delay, - .preflight = NULL, .play = &play, .volume = NULL, .parameters = NULL, @@ -434,4 +433,4 @@ void jack_stop(void) { // debug(1, "jack stop"); if (config.jack_auto_client_disconnect) jack_close(); -} \ No newline at end of file +} diff --git a/audio_pa.c b/audio_pa.c index 4ee20c75..cd321bd9 100644 --- a/audio_pa.c +++ b/audio_pa.c @@ -312,7 +312,6 @@ audio_output audio_pa = {.name = "pa", .flush = &flush, .delay = &pa_delay, .play = &play, - .preflight = NULL, .volume = NULL, .parameters = NULL, .mute = NULL}; diff --git a/audio_pipe.c b/audio_pipe.c index 0d4a42fd..89a09a0c 100644 --- a/audio_pipe.c +++ b/audio_pipe.c @@ -139,7 +139,6 @@ audio_output audio_pipe = {.name = "pipe", .flush = NULL, .delay = NULL, .play = &play, - .preflight = NULL, .volume = NULL, .parameters = NULL, .mute = NULL}; diff --git a/audio_sndio.c b/audio_sndio.c index e106b15d..f22ed5af 100644 --- a/audio_sndio.c +++ b/audio_sndio.c @@ -49,7 +49,6 @@ audio_output audio_sndio = {.name = "sndio", .flush = &flush, .delay = &delay, .play = &play, - .preflight = NULL, .volume = NULL, .parameters = NULL, .mute = NULL}; diff --git a/audio_soundio.c b/audio_soundio.c index 8942554d..f57f9933 100644 --- a/audio_soundio.c +++ b/audio_soundio.c @@ -222,7 +222,6 @@ audio_output audio_soundio = {.name = "soundio", .flush = &flush, .delay = NULL, .play = &play, - .preflight = NULL, .volume = NULL, .parameters = ¶meters, .mute = NULL}; diff --git a/audio_stdout.c b/audio_stdout.c index 37d6f781..0438b1af 100644 --- a/audio_stdout.c +++ b/audio_stdout.c @@ -86,7 +86,6 @@ audio_output audio_stdout = {.name = "stdout", .flush = NULL, .delay = NULL, .play = &play, - .preflight = NULL, .volume = NULL, .parameters = NULL, .mute = NULL};