From e9b96c6e56e1a267d227e7089dd1a9f562639717 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 29 Dec 2008 17:29:14 +0100 Subject: [PATCH] player_thread: use GLib logging --- src/player_thread.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/player_thread.c b/src/player_thread.c index d588a079b..bbbb5e619 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -22,7 +22,6 @@ #include "audio.h" #include "pcm_utils.h" #include "path.h" -#include "log.h" #include "main_notify.h" #include "crossfade.h" #include "song.h" @@ -31,6 +30,9 @@ #include +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "player_thread" + enum xfade_state { XFADE_DISABLED = -1, XFADE_UNKNOWN = 0, @@ -176,9 +178,9 @@ static void player_process_command(struct player *player) assert(dc.next_song == NULL || dc.next_song->url != NULL); pc.errored_song = dc.next_song; pc.error = PLAYER_ERROR_AUDIO; - ERROR("problems opening audio device " - "while playing \"%s\"\n", - song_get_url(dc.next_song, tmp)); + g_warning("problems opening audio device " + "while playing \"%s\"", + song_get_url(dc.next_song, tmp)); player->paused = true; } } @@ -329,9 +331,9 @@ static void do_play(void) assert(dc.next_song == NULL || dc.next_song->url != NULL); pc.errored_song = dc.next_song; pc.error = PLAYER_ERROR_AUDIO; - ERROR("problems opening audio device " - "while playing \"%s\"\n", - song_get_url(dc.next_song, tmp)); + g_warning("problems opening audio device " + "while playing \"%s\"", + song_get_url(dc.next_song, tmp)); break; } @@ -539,5 +541,5 @@ void player_create(void) GThread *t; if (!(t = g_thread_create(player_task, NULL, FALSE, &e))) - FATAL("Failed to spawn player task: %s\n", e->message); + g_error("Failed to spawn player task: %s", e->message); }