Remove the preflight call - don't seem to need it.

This commit is contained in:
Mike Brady
2019-01-27 15:53:36 +00:00
parent 90ed88dbc5
commit aa5698fce2
10 changed files with 1 additions and 21 deletions
-2
View File
@@ -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);
-10
View File
@@ -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
-1
View File
@@ -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,
-1
View File
@@ -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,
+1 -2
View File
@@ -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();
}
}
-1
View File
@@ -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};
-1
View File
@@ -139,7 +139,6 @@ audio_output audio_pipe = {.name = "pipe",
.flush = NULL,
.delay = NULL,
.play = &play,
.preflight = NULL,
.volume = NULL,
.parameters = NULL,
.mute = NULL};
-1
View File
@@ -49,7 +49,6 @@ audio_output audio_sndio = {.name = "sndio",
.flush = &flush,
.delay = &delay,
.play = &play,
.preflight = NULL,
.volume = NULL,
.parameters = NULL,
.mute = NULL};
-1
View File
@@ -222,7 +222,6 @@ audio_output audio_soundio = {.name = "soundio",
.flush = &flush,
.delay = NULL,
.play = &play,
.preflight = NULL,
.volume = NULL,
.parameters = &parameters,
.mute = NULL};
-1
View File
@@ -86,7 +86,6 @@ audio_output audio_stdout = {.name = "stdout",
.flush = NULL,
.delay = NULL,
.play = &play,
.preflight = NULL,
.volume = NULL,
.parameters = NULL,
.mute = NULL};