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);
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);
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
.is_running = &jack_is_running,
.flush = &jack_flush,
.delay = &jack_delay,
- .preflight = NULL,
.play = &play,
.volume = NULL,
.parameters = NULL,
// debug(1, "jack stop");
if (config.jack_auto_client_disconnect)
jack_close();
-}
\ No newline at end of file
+}