From 4a3a621caf7b5fe09e3f9ab1e7b03eab0b299315 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 21 Nov 2008 20:13:36 +0100 Subject: audiofile: use GLib instead of log.h --- src/decoder/audiofile_plugin.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/decoder/audiofile_plugin.c') diff --git a/src/decoder/audiofile_plugin.c b/src/decoder/audiofile_plugin.c index 40f5c31f0..95ae37dd7 100644 --- a/src/decoder/audiofile_plugin.c +++ b/src/decoder/audiofile_plugin.c @@ -19,10 +19,13 @@ */ #include "../decoder_api.h" -#include "../log.h" #include #include +#include + +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "audiofile" /* pick 1020 since its devisible for 8,16,24, and 32-bit audio */ #define CHUNK_SIZE 1020 @@ -55,13 +58,13 @@ audiofile_decode(struct decoder *decoder, const char *path) char chunk[CHUNK_SIZE]; if (stat(path, &st) < 0) { - ERROR("failed to stat: %s\n", path); + g_warning("failed to stat: %s\n", path); return; } af_fp = afOpenFile(path, "r", NULL); if (af_fp == AF_NULL_FILEHANDLE) { - ERROR("failed to open: %s\n", path); + g_warning("failed to open: %s\n", path); return; } @@ -81,8 +84,8 @@ audiofile_decode(struct decoder *decoder, const char *path) bitRate = (uint16_t)(st.st_size * 8.0 / total_time / 1000.0 + 0.5); if (audio_format.bits != 8 && audio_format.bits != 16) { - ERROR("Only 8 and 16-bit files are supported. %s is %i-bit\n", - path, audio_format.bits); + g_warning("Only 8 and 16-bit files are supported. %s is %i-bit\n", + path, audio_format.bits); afCloseFile(af_fp); return; } @@ -123,9 +126,8 @@ static struct tag *audiofileTagDup(const char *file) ret = tag_new(); ret->time = total_time; } else { - DEBUG - ("audiofileTagDup: Failed to get total song time from: %s\n", - file); + g_debug("Failed to get total song time from: %s\n", + file); } return ret; -- cgit v1.2.3