# HG changeset patch # User Matti Hamalainen # Date 1352408525 -7200 # Node ID 2663b1ac9ce6aaf46052c01ce1bc132d1f6fa0c6 # Parent a293b88eb3fbc15c60a1f904ac919c30601e571b Improve debugging. diff -r a293b88eb3fb -r 2663b1ac9ce6 src/xmms-sid.c --- a/src/xmms-sid.c Thu Nov 08 22:44:50 2012 +0200 +++ b/src/xmms-sid.c Thu Nov 08 23:02:05 2012 +0200 @@ -580,6 +580,7 @@ /* Initialize the tune */ if (!xs_status.engine->plrLoadSID(&xs_status, filename)) { + XSDEBUG("backend could not load '%s'\n", filename); xs_tuneinfo_free(xs_status.tuneInfo); xs_status.tuneInfo = NULL; return; diff -r a293b88eb3fb -r 2663b1ac9ce6 src/xs_sidplay.h --- a/src/xs_sidplay.h Thu Nov 08 22:44:50 2012 +0200 +++ b/src/xs_sidplay.h Thu Nov 08 23:02:05 2012 +0200 @@ -31,33 +31,27 @@ XSTuneInfo *res; TTUNEINFO info; TTUNE *tune; - guint8 *buf = NULL; - size_t bufSize = 0; - /* Load file */ - if (xs_fload_buffer(filename, &buf, &bufSize) != 0) - return NULL; - /* Check if the tune exists and is readable */ - if ((tune = new TTUNE(buf, bufSize)) == NULL) + if ((tune = new TTUNE(filename)) == NULL) { - g_free(buf); + XSDEBUG("could not initialize tune from '%s'.\n", filename); return NULL; } - g_free(buf); if (!tune->getStatus()) { + XSDEBUG("tune->getStatus() returned false for '%s'.\n", filename); delete tune; return NULL; } /* Get general tune information */ -#ifdef XS_SIDPLAY1_H +#if defined(XS_SIDPLAY1_H) tune->getInfo(info); -#endif - -#ifdef XS_SIDPLAY2_H +#elif defined(XS_SIDPLAY2_H) + info = tune->getInfo(); +#elif defined(XS_SIDPLAYFP_H) info = tune->getInfo(); #endif diff -r a293b88eb3fb -r 2663b1ac9ce6 src/xs_sidplay2.cpp --- a/src/xs_sidplay2.cpp Thu Nov 08 22:44:50 2012 +0200 +++ b/src/xs_sidplay2.cpp Thu Nov 08 23:02:05 2012 +0200 @@ -79,9 +79,9 @@ */ #define TFUNCTION xs_sidplay2_getinfo #define TFUNCTION2 xs_sidplay2_updateinfo +#define TENGINE XSSIDPlay2 #define TTUNEINFO SidTuneInfo #define TTUNE SidTune -#define TENGINE XSSIDPlay2 #include "xs_sidplay.h" diff -r a293b88eb3fb -r 2663b1ac9ce6 src/xs_sidplayfp.cpp --- a/src/xs_sidplayfp.cpp Thu Nov 08 22:44:50 2012 +0200 +++ b/src/xs_sidplayfp.cpp Thu Nov 08 23:02:05 2012 +0200 @@ -360,7 +360,7 @@ filename, (engine->tune.getInfo()).statusString); return FALSE; } - + return TRUE; }