[pipe] Support for Shairport sync metadata flush event

This commit is contained in:
ejurgensen
2021-03-07 14:02:23 +01:00
parent f1c41e113d
commit 363bd5644b
3 changed files with 77 additions and 0 deletions

View File

@@ -370,6 +370,12 @@ handle_progress(struct input_metadata *m, char *progress)
DPRINTF(E_DBG, L_PLAYER, "Received Shairport metadata progress: %" PRIi64 "/%" PRIi64 "/%" PRIi64 " => %d/%u ms\n", start, pos, end, m->pos_ms, m->len_ms);
}
static void
handle_flush(void)
{
player_playback_flush();
}
static void
handle_volume(const char *volume)
{
@@ -506,6 +512,12 @@ handle_item(struct input_metadata *m, const char *item)
goto out_error;
}
if (code == dmapval("pfls"))
{
handle_flush();
goto out_nothing;
}
if (code == dmapval("asal"))
dstptr = &m->album;
else if (code == dmapval("asar"))