From 3d779e1273f332577023204c380b2a88fcf7e8b9 Mon Sep 17 00:00:00 2001 From: chme Date: Sat, 26 May 2018 10:25:22 +0200 Subject: [PATCH] [player] Additional debug logs for speaker volume --- src/player.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/player.c b/src/player.c index 6d0cb253..0b49d703 100644 --- a/src/player.c +++ b/src/player.c @@ -2631,6 +2631,23 @@ volume_set(void *arg, int *retval) return COMMAND_END; } +#ifdef DEBUG_RELVOL +static void debug_print_speaker() +{ + struct output_device *device; + + DPRINTF(E_DBG, L_PLAYER, "*** Master: %d\n", master_volume); + + for (device = dev_list; device; device = device->next) + { + if (!device->selected) + continue; + + DPRINTF(E_DBG, L_PLAYER, "*** %s: abs %d rel %d\n", device->name, device->volume, device->relvol); + } +} +#endif + static enum command_state volume_setrel_speaker(void *arg, int *retval) { @@ -2667,6 +2684,9 @@ volume_setrel_speaker(void *arg, int *retval) break; } +#ifdef DEBUG_RELVOL + debug_print_speaker(); +#endif listener_notify(LISTENER_VOLUME); if (*retval > 0) @@ -2717,6 +2737,9 @@ volume_setabs_speaker(void *arg, int *retval) } } +#ifdef DEBUG_RELVOL + debug_print_speaker(); +#endif listener_notify(LISTENER_VOLUME); if (*retval > 0)