From f950cfc3a25c2162f51b5d95ca247e4e693ea848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Mon, 20 Jul 2020 16:16:58 +0200 Subject: [PATCH] fbd-dev-sound: Be less verbose on missing sound files This is quite common so don't fill the logs at normal debug levels but be more specific about what is missing. --- src/fbd-dev-sound.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/fbd-dev-sound.c b/src/fbd-dev-sound.c index fc38da0..26211d7 100644 --- a/src/fbd-dev-sound.c +++ b/src/fbd-dev-sound.c @@ -142,7 +142,13 @@ on_sound_play_finished_callback (GSoundContext *ctx, GError *err = NULL; if (!gsound_context_play_full_finish (ctx, res, &err)) { - g_warning ("Failed to play sound: %s", err->message); + if (err->domain == GSOUND_ERROR && err->code == GSOUND_ERROR_NOTFOUND) { + g_debug ("Failed to find sound '%s'", fbd_feedback_sound_get_effect (data->feedback)); + } else { + g_warning ("Failed to play sound '%s': %s", + fbd_feedback_sound_get_effect (data->feedback), + err->message); + } } (*data->callback)(data->feedback);