From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:09:26 +0000 (+0100) Subject: Add a new call to the backends -- prepare_to_play() -- to give them advance warning... X-Git-Tag: 4.3.5^2~28 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=67f422fb9d83ab58c061c77626afe981fb2d3abc;p=thirdparty%2Fshairport-sync.git Add a new call to the backends -- prepare_to_play() -- to give them advance warning that audio will be coming soon. Sent when the first frame is received. --- diff --git a/player.c b/player.c index 11b0c538..102085a4 100644 --- a/player.c +++ b/player.c @@ -1179,6 +1179,10 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) { if (conn->ab_buffering) { // if we are getting packets but not yet forwarding them to the // player if (conn->first_packet_timestamp == 0) { // if this is the very first packet + + if (config.output->prepare_to_play) // tell the player to get ready + config.output->prepare_to_play(); // there could be more than one of these sent + conn->first_packet_timestamp = curframe->given_timestamp; // we will keep buffering until we are // supposed to start playing this