From 50738c360d197b08081179dcc602af3f13665eb2 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sat, 26 Nov 2022 18:09:57 +0000 Subject: [PATCH] SEnd metadata _after_ sending audio to the output. --- player.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/player.c b/player.c index ebab2c01c..935129830 100644 --- a/player.c +++ b/player.c @@ -3045,7 +3045,10 @@ void *player_thread_func(void *arg) { uint64_t should_be_time; frame_to_local_time(inframe->given_timestamp, &should_be_time, conn); + config.output->play(conn->outbuf, play_samples, play_samples_are_timed, + inframe->given_timestamp, should_be_time); #ifdef CONFIG_METADATA + // debug(1,"config.metadata_progress_interval is %f.", config.metadata_progress_interval); if (config.metadata_progress_interval != 0.0) { char hb[128]; if (this_is_the_first_frame != 0) { @@ -3067,8 +3070,6 @@ void *player_thread_func(void *arg) { } } #endif - config.output->play(conn->outbuf, play_samples, play_samples_are_timed, - inframe->given_timestamp, should_be_time); } } @@ -3116,7 +3117,10 @@ void *player_thread_func(void *arg) { } uint64_t should_be_time; frame_to_local_time(inframe->given_timestamp, &should_be_time, conn); + config.output->play(conn->outbuf, play_samples, play_samples_are_timed, + inframe->given_timestamp, should_be_time); #ifdef CONFIG_METADATA + // debug(1,"config.metadata_progress_interval is %f.", config.metadata_progress_interval); if (config.metadata_progress_interval != 0.0) { char hb[128]; if (this_is_the_first_frame != 0) { @@ -3138,8 +3142,6 @@ void *player_thread_func(void *arg) { } } #endif - config.output->play(conn->outbuf, play_samples, play_samples_are_timed, - inframe->given_timestamp, should_be_time); } }