diff options
author | Max Kellermann <max@duempel.org> | 2008-12-28 19:48:53 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-28 19:48:53 +0100 |
commit | 4b3a055ffe39c8f71a93b2bffef9ef602b8ae2bf (patch) | |
tree | c1cc2548bb430056557ac9424a32011d8d2eb619 | |
parent | 4ca02bfcfc28b617aedf1ae9a9b274257cac6e37 (diff) | |
download | mpd-4b3a055ffe39c8f71a93b2bffef9ef602b8ae2bf.tar.gz mpd-4b3a055ffe39c8f71a93b2bffef9ef602b8ae2bf.tar.xz mpd-4b3a055ffe39c8f71a93b2bffef9ef602b8ae2bf.zip |
mikmod: use Glib instead of utils.h/log.h
Diffstat (limited to '')
-rw-r--r-- | src/decoder/mod_plugin.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/decoder/mod_plugin.c b/src/decoder/mod_plugin.c index 2d97d9ccb..b2654d111 100644 --- a/src/decoder/mod_plugin.c +++ b/src/decoder/mod_plugin.c @@ -17,8 +17,6 @@ */ #include "../decoder_api.h" -#include "../utils.h" -#include "../log.h" #include <glib.h> #include <mikmod.h> @@ -108,8 +106,8 @@ static bool mod_initMikMod(void) DMODE_16BITS); if (MikMod_Init(params)) { - ERROR("Could not init MikMod: %s\n", - MikMod_strerror(MikMod_errno)); + g_warning("Could not init MikMod: %s\n", + MikMod_strerror(MikMod_errno)); return false; } @@ -142,8 +140,7 @@ static mod_Data *mod_open(const char *path) /* Prevent module from looping forever */ moduleHandle->loop = 0; - data = xmalloc(sizeof(mod_Data)); - + data = g_new(mod_Data, 1); data->moduleHandle = moduleHandle; Player_Start(data->moduleHandle); @@ -169,7 +166,7 @@ mod_decode(struct decoder *decoder, const char *path) enum decoder_command cmd = DECODE_COMMAND_NONE; if (!(data = mod_open(path))) { - ERROR("failed to open mod: %s\n", path); + g_warning("failed to open mod: %s\n", path); MikMod_Exit(); return; } @@ -209,7 +206,7 @@ static struct tag *modTagDup(const char *file) g_free(path2); if (moduleHandle == NULL) { - DEBUG("modTagDup: Failed to open file: %s\n", file); + g_debug("modTagDup: Failed to open file: %s\n", file); MikMod_Exit(); return NULL; @@ -221,7 +218,7 @@ static struct tag *modTagDup(const char *file) ret->time = 0; path2 = g_strdup(file); - title = xstrdup(Player_LoadTitle(path2)); + title = g_strdup(Player_LoadTitle(path2)); g_free(path2); if (title) tag_add_item(ret, TAG_ITEM_TITLE, title); |