# HG changeset patch # User Matti Hamalainen # Date 1169704685 0 # Node ID 3f02945a0c484455dd9699c44abcf72aa3d34f7f # Parent 1733f81f7480149702844d7b65bd8451e6f03dfc Cleanups. diff -r 1733f81f7480 -r 3f02945a0c48 Makefile.am --- a/Makefile.am Thu Jan 25 03:51:01 2007 +0000 +++ b/Makefile.am Thu Jan 25 05:58:05 2007 +0000 @@ -2,16 +2,23 @@ ### Makefile.am for XMMS-SID ### # Require latest automake -AUTOMAKE_OPTIONS = 1.7 +AUTOMAKE_OPTIONS = 1.9 PACKAGE = @PACKAGE@ VERSION = @VERSION@ +themetune = Kummatti_City.sid +libxmmssiddir = $(pkgdatadir) +libxmmssid_DATA = $(themetune) + +SUBDIRS = m4 po +ACLOCAL_AMFLAGS = -I m4 + # Personal XMMS directory in user's home USERHOMEPREFIX = ~/.xmms/Plugins # All the rest of the distributed files -EXTRA_DIST = mkinstalldirs \ +EXTRA_DIST = mkinstalldirs \ FAQ \ BUGS \ THANKS \ @@ -57,7 +64,10 @@ lib_LTLIBRARIES = libxmmssid.la # Generals -AM_CFLAGS = -W -Wall -D_REENTRANT @XMMS_CFLAGS@ @SIDPLAY1_INCLUDES@ @SIDPLAY2_INCLUDES@ @BUILDERS_INCLUDES@ +AM_CFLAGS = -W -Wall -D_REENTRANT @XMMS_CFLAGS@ @SIDPLAY1_INCLUDES@ \ + @SIDPLAY2_INCLUDES@ @BUILDERS_INCLUDES@ \ + -DTHEMETUNE_FILE="\"$(pkgdatadir)/$(themetune)\"" + AM_CXXFLAGS = $(AM_CFLAGS) libxmmssid_la_LDFLAGS = -module -avoid-version @BUILDERS_LDFLAGS@ @@ -84,9 +94,3 @@ src/xs_sidplay2.cc src/xs_sidplay2.h \ src/xmms-sid.c src/xmms-sid.h -libxmmssiddir = $(pkgdatadir) -libxmmssid_DATA = @THEMETUNE_FILE@ - -SUBDIRS = m4 po - -ACLOCAL_AMFLAGS = -I m4 diff -r 1733f81f7480 -r 3f02945a0c48 TODO --- a/TODO Thu Jan 25 03:51:01 2007 +0000 +++ b/TODO Thu Jan 25 05:58:05 2007 +0000 @@ -4,19 +4,6 @@ For XMMS-SID v0.8 ----------------- RC1: -- explain --disable-themetune in README -- fix NEWS - -- XS_STIL_MAXENTRY and related problems. remove - hardcoded limit. best would be to unify STIL/SLDB/ - t_xs_tuneinfo since xs_tuneinfo is dynamic. this - would also imply towards usefulness of XSIDB - (see below) - - possibly just increase XS_STIL_MAXENTRY to - work around problems for now. rewriting the STIL/SLDB - junk would mean too much work for 0.8. - - Subtune INFO selector does not have text when the fileinfo window is first opened, why? - Tabify filter configuration and add separate tabs @@ -25,7 +12,6 @@ - Fix remaining bugs, if any. 0.8.0 FINAL: -- Clean up and re-indent the code - Check documentation (README, FAQ) diff -r 1733f81f7480 -r 3f02945a0c48 config.rpath --- a/config.rpath Thu Jan 25 03:51:01 2007 +0000 +++ b/config.rpath Thu Jan 25 05:58:05 2007 +0000 @@ -18,7 +18,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -143,7 +143,7 @@ ld_shlibs=no ;; beos*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no @@ -162,9 +162,9 @@ netbsd*) ;; solaris* | sysv5*) - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no @@ -174,7 +174,7 @@ hardcode_direct=yes ;; *) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no diff -r 1733f81f7480 -r 3f02945a0c48 configure.in --- a/configure.in Thu Jan 25 03:51:01 2007 +0000 +++ b/configure.in Thu Jan 25 05:58:05 2007 +0000 @@ -2,8 +2,8 @@ dnl *** Process this file with autoconf to produce a configure script. dnl *** -dnl Require autoconf 2.56 or later -AC_PREREQ([2.56]) +dnl Require autoconf 2.60 or later +AC_PREREQ([2.60]) dnl Initialize AC_INIT([XMMS-SID], [0.8.0beta16], [ccr@tnsp.org]) @@ -25,7 +25,6 @@ AH_TEMPLATE([HAVE_RESID_BUILDER],[Define if you have reSID with libSIDPlay 2]) AH_TEMPLATE([HAVE_HARDSID_BUILDER],[Define if you have HardSID with libSIDPlay 2]) AH_TEMPLATE([HAVE_THEMETUNE],[Define if you want to build code to play XMMS-SID theme SID-tune. The tune needs to be installed too, though.]) -AH_TEMPLATE([THEMETUNE_FILE],[Path and filename of the XMMS-SID theme song]) dnl *** @@ -96,29 +95,8 @@ OPT_THEMETUNE=no fi fi -],[ -OPT_THEMETUNE=yes -]) - -dnl *** Bits and pieces stolen from Glade generated configure.in -if test "x$OPT_THEMETUNE" = "xyes"; then - THEMETUNE_FILE="Kummatti_City.sid" - - if test "x${datadir}" = 'x${prefix}/share'; then - if test "x${prefix}" = "xNONE"; then - AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${ac_default_prefix}/share/${PACKAGE}/${THEMETUNE_FILE}") - else - AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${prefix}/share/${PACKAGE}/${THEMETUNE_FILE}") - fi - else - AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${datadir}/${PACKAGE}/${THEMETUNE_FILE}") - fi - - AC_DEFINE([HAVE_THEMETUNE]) -else - THEMETUNE_FILE="" -fi -dnl AC_SUBST([THEMETUNE_FILE]) +],[OPT_THEMETUNE=yes]) +AC_DEFINE([HAVE_THEMETUNE],[test "x$OPT_THEMETUNE" = "xyes"]) dnl *** @@ -310,4 +288,5 @@ libSIDPlay 2 support : $OPT_SIDPLAY2 Included builders : $xs_builders XMMS-SID theme SID-tune : $OPT_THEMETUNE + Translations (i18n/nls) : $USE_NLS ]) diff -r 1733f81f7480 -r 3f02945a0c48 src/xmms-sid.c --- a/src/xmms-sid.c Thu Jan 25 03:51:01 2007 +0000 +++ b/src/xmms-sid.c Thu Jan 25 05:58:05 2007 +0000 @@ -411,8 +411,7 @@ myTune->sidFilename, myStatus.currSong); goto xs_err_exit; } - - + /* Open the audio output */ XSDEBUG("open audio output (%d, %d, %d)\n", myStatus.audioFormat, myStatus.audioFrequency, myStatus.audioChannels); @@ -434,6 +433,7 @@ /* Set song information for current subtune */ XSDEBUG("set tune info\n"); + myStatus.sidPlayer->plrUpdateSIDInfo(&myStatus); tmpTitle = xs_make_titlestring(myTune, myStatus.currSong); xs_plugin_ip.set_info( diff -r 1733f81f7480 -r 3f02945a0c48 src/xs_length.c --- a/src/xs_length.c Thu Jan 25 03:51:01 2007 +0000 +++ b/src/xs_length.c Thu Jan 25 05:58:05 2007 +0000 @@ -148,9 +148,14 @@ } /* Allocate memory for lengths */ - tmpNode->sLengths = (gint *) g_malloc0(tmpNode->nLengths * sizeof(gint)); - if (!tmpNode->sLengths) { - xs_error(_("Could not allocate memory for node.\n")); + if (tmpNode->nLengths > 0) { + tmpNode->sLengths = (gint *) g_malloc0(tmpNode->nLengths * sizeof(gint)); + if (!tmpNode->sLengths) { + xs_error(_("Could not allocate memory for node.\n")); + xs_sldb_node_free(tmpNode); + return NULL; + } + } else { xs_sldb_node_free(tmpNode); return NULL; } diff -r 1733f81f7480 -r 3f02945a0c48 src/xs_sidplay.h --- a/src/xs_sidplay.h Thu Jan 25 03:51:01 2007 +0000 +++ b/src/xs_sidplay.h Thu Jan 25 05:58:05 2007 +0000 @@ -67,34 +67,21 @@ i = myStatus->tuneInfo; i->sidModel = myInfo.sidModel; - if ((myStatus->currSong >= 1) && (myStatus->currSong < i->nsubTunes)) { - t_xs_subtuneinfo *t = &(i->subTunes[myStatus->currSong - 1]); +XSDEBUG("%s[%d]: %d, %d\n", i->sidFilename, myStatus->currSong, myInfo.songSpeed, myInfo.clockSpeed); + + if ((myStatus->currSong > 0) && (myStatus->currSong <= i->nsubTunes)) { + gint tmpSpeed = -1; - switch (myInfo.songSpeed) { - case SIDTUNE_SPEED_VBI: - switch (myInfo.clockSpeed) { - case SIDTUNE_CLOCK_PAL: - t->tuneSpeed = 50; - break; - - case SIDTUNE_CLOCK_NTSC: - t->tuneSpeed = 60; - break; - - default: - t->tuneSpeed = -1; - break; - } - break; - - case SIDTUNE_SPEED_CIA_1A: - t->tuneSpeed = 60; - break; - + switch (myInfo.clockSpeed) { + case SIDTUNE_CLOCK_PAL: tmpSpeed = 50; break; + case SIDTUNE_CLOCK_NTSC: tmpSpeed = 60; break; default: - t->tuneSpeed = -1; + if (myInfo.songSpeed != 0) + tmpSpeed = myInfo.songSpeed; break; } + + i->subTunes[myStatus->currSong - 1].tuneSpeed = tmpSpeed; } return TRUE; diff -r 1733f81f7480 -r 3f02945a0c48 src/xs_title.c --- a/src/xs_title.c Thu Jan 25 03:51:01 2007 +0000 +++ b/src/xs_title.c Thu Jan 25 05:58:05 2007 +0000 @@ -74,8 +74,8 @@ /* Get sub-tune information */ - if ((subTune >= 0) && (subTune < p->nsubTunes)) { - subInfo = &(p->subTunes[subTune]); + if ((subTune > 0) && (subTune <= p->nsubTunes)) { + subInfo = &(p->subTunes[subTune - 1]); } else subInfo = NULL; @@ -96,7 +96,7 @@ ptInput->file_path = tmpFilePath; ptInput->track_name = p->sidName; - ptInput->track_number = subTune + 1; + ptInput->track_number = subTune; ptInput->album_name = NULL; ptInput->performer = p->sidComposer; ptInput->date = (p->sidModel == XS_SIDMODEL_6581) ? "SID6581" : "SID8580"; @@ -166,7 +166,7 @@ VPUTSTR("?"); break; case 'n': - g_snprintf(tmpStr, XS_BUF_SIZE, "%i", subTune + 1); + g_snprintf(tmpStr, XS_BUF_SIZE, "%i", subTune); VPUTSTR(tmpStr); break; case 'N':