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.
This commit is contained in:
Guido Günther
2020-07-20 16:19:17 +02:00
parent 4bcf9d9fbb
commit f950cfc3a2
+7 -1
View File
@@ -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);