commit 93cde5d11223ff70e3ced414173b32a63790c972 from: Omar Polo date: Mon Jan 09 10:06:12 2023 UTC drop notify_seek var; always notify on seeks First move towards a change in the behaviour of `monitor': advancement on tracks during the play are reported also every second, as the music is played, not only when there's an explicit seek. commit - b817795c01c252bf4f7fc4f85b839d2ccb46b550 commit + 93cde5d11223ff70e3ced414173b32a63790c972 blob - 9b5e69f366449dfed4f49652e7e81b5c5cec3fc4 blob + e89aa222882a4dd27104d59da67d585812bc3904 --- amused.c +++ amused.c @@ -47,8 +47,6 @@ pid_t player_pid; struct event ev_sigint; struct event ev_sigterm; -static int notify_seek; - enum amused_process { PROC_MAIN, PROC_PLAYER, @@ -138,10 +136,7 @@ main_dispatch_player(int sig, short event, void *d) sizeof(current_position)); if (current_position < 0) current_position = -1; - if (notify_seek) { - notify_seek = 0; - control_notify(IMSG_CTL_SEEK); - } + control_notify(IMSG_CTL_SEEK); break; case IMSG_LEN: if (datalen != sizeof(current_duration)) @@ -595,6 +590,5 @@ main_seek(struct player_seek *s) break; } - notify_seek = 1; main_send_player(IMSG_CTL_SEEK, -1, s, sizeof(*s)); }