aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_init.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-25 17:47:46 +0100
committerMax Kellermann <max@duempel.org>2008-11-25 17:47:46 +0100
commit7918785c78021258131e28a7a534064bdbc85dca (patch)
treea30a9d59d2aa5a612a7b4a7c8cd5043d32eb4920 /src/output_init.c
parent0277921e6a9a1dd473e1fcfe9e31ca39fa76ddea (diff)
downloadmpd-7918785c78021258131e28a7a534064bdbc85dca.tar.gz
mpd-7918785c78021258131e28a7a534064bdbc85dca.tar.xz
mpd-7918785c78021258131e28a7a534064bdbc85dca.zip
output: use GLib instead of log.h/util.h
Diffstat (limited to '')
-rw-r--r--src/output_init.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/output_init.c b/src/output_init.c
index 89853ff9e..bdd2b1eb6 100644
--- a/src/output_init.c
+++ b/src/output_init.c
@@ -20,9 +20,10 @@
#include "output_api.h"
#include "output_internal.h"
#include "output_list.h"
-#include "log.h"
#include "audio.h"
+#include <glib.h>
+
#define AUDIO_OUTPUT_TYPE "type"
#define AUDIO_OUTPUT_NAME "name"
#define AUDIO_OUTPUT_FORMAT "format"
@@ -30,9 +31,9 @@
#define getBlockParam(name, str, force) { \
bp = getBlockParam(param, name); \
if(force && bp == NULL) { \
- FATAL("couldn't find parameter \"%s\" in audio output " \
- "definition beginning at %i\n", \
- name, param->line); \
+ g_error("couldn't find parameter \"%s\" in audio output " \
+ "definition beginning at %i\n", \
+ name, param->line); \
} \
if(bp) str = bp->value; \
}
@@ -53,30 +54,30 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
plugin = audio_output_plugin_get(type);
if (plugin == NULL) {
- FATAL("couldn't find audio output plugin for type "
- "\"%s\" at line %i\n", type, param->line);
+ g_error("couldn't find audio output plugin for type "
+ "\"%s\" at line %i\n", type, param->line);
}
} else {
unsigned i;
- WARNING("No \"%s\" defined in config file\n",
- CONF_AUDIO_OUTPUT);
- WARNING("Attempt to detect audio output device\n");
+ g_warning("No \"%s\" defined in config file\n",
+ CONF_AUDIO_OUTPUT);
+ g_warning("Attempt to detect audio output device\n");
audio_output_plugins_for_each(plugin, i) {
if (plugin->test_default_device) {
- WARNING("Attempting to detect a %s audio "
- "device\n", plugin->name);
+ g_warning("Attempting to detect a %s audio "
+ "device\n", plugin->name);
if (plugin->test_default_device()) {
- WARNING("Successfully detected a %s "
- "audio device\n", plugin->name);
+ g_warning("Successfully detected a %s "
+ "audio device\n", plugin->name);
break;
}
}
}
if (plugin == NULL) {
- WARNING("Unable to detect an audio device\n");
+ g_warning("Unable to detect an audio device\n");
return 0;
}
@@ -96,7 +97,7 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
if (format) {
if (0 != parseAudioConfig(&ao->reqAudioFormat, format)) {
- FATAL("error parsing format at line %i\n", bp->line);
+ g_error("error parsing format at line %i\n", bp->line);
}
} else
audio_format_clear(&ao->reqAudioFormat);