From: Andre Noll Date: Tue, 22 Dec 2015 23:24:47 +0000 (+0000) Subject: audiod: Force status dump on slot changes. X-Git-Tag: v0.5.6~21^2~1 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=20635453048bdf7f99d9fb5fbe53178ff386f74c;hp=f23669d91a09066b7ecd7b07a74bea8fad61ad39 audiod: Force status dump on slot changes. This makes para_gui report such changes immediately. Without these extra dumps, it may take up to 500ms for the stat client to notice. --- diff --git a/audiod.c b/audiod.c index 94afa1cf..7be40de0 100644 --- a/audiod.c +++ b/audiod.c @@ -1229,10 +1229,15 @@ static void close_slot(int slot_num) static void close_unused_slots(void) { int i; + bool dump = false; FOR_EACH_SLOT(i) - if (must_close_slot(i)) + if (must_close_slot(i)) { close_slot(i); + dump = true; + } + if (dump) + audiod_status_dump(true); } /* @@ -1277,6 +1282,7 @@ static void start_stop_decoders(void) open_writers(sl); activate_grab_clients(&sched); btr_log_tree(sl->receiver_node->btrn, LL_NOTICE); + audiod_status_dump(true); } static void status_pre_select(struct sched *s, void *context)