Mercurial > hg > xmms-sid
changeset 849:2663b1ac9ce6
Improve debugging.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 08 Nov 2012 23:02:05 +0200 |
parents | a293b88eb3fb |
children | 82e759a5c7e6 |
files | src/xmms-sid.c src/xs_sidplay.h src/xs_sidplay2.cpp src/xs_sidplayfp.cpp |
diffstat | 4 files changed, 10 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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
--- 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"