# HG changeset patch # User Matti Hamalainen # Date 1054761724 0 # Node ID ac2972a7ccd58b1693879c85f9204d4bd9a264e2 # Parent d5789951b7e2285cfe6fe5ce287d8426c28ae84a Fixed typos and stuff. diff -r d5789951b7e2 -r ac2972a7ccd5 src/xmms-sid.cc --- a/src/xmms-sid.cc Wed Jun 04 21:21:05 2003 +0000 +++ b/src/xmms-sid.cc Wed Jun 04 21:22:04 2003 +0000 @@ -22,6 +22,8 @@ */ #include "xmms-sid.h" +#include "xs_config.h" +#include "xs_length.h" #include #include #include @@ -86,6 +88,12 @@ xs_status.s_allownext = 1; // Initialize to TRUE to allow first song xs_status.s_tune = NULL; xs_status.s_fname = NULL; + + /* Read song-length database */ + if (xs_songlen_init() < 0) + { + XSERR("Error initializing song-length database!\n"); + } /* Initialize STIL structures */ // FIXME FIXME FIx ME @@ -103,12 +111,12 @@ XSDEBUG("shutting down...\n"); /* Stop playing */ - xmms_sid_ip.stop(); + xs_plugin_ip.stop(); /* Free allocated memory */ + xs_songlen_close(); // FIXME FIXME: STIL-entries, songlendb - } @@ -186,8 +194,8 @@ /* Get song information */ xs_status.s_tune->getInfo(plr_sidInf); - plr_tune_len = xs_get_length(xs_status.s_fname, plr_tune_num); - plr_tune_title = xs_get_filetitle(&plr_sidInf, plr_tune_num); + plr_tune_len = xs_songlen_get(xs_status.s_fname, plr_tune_num); + plr_tune_title = xs_filetitle_get(&plr_sidInf, plr_tune_num); XSDEBUG("title='%s', len=%d\n", plr_tune_title, plr_tune_len); @@ -518,9 +526,9 @@ delete testTune; /* Get titlestring */ - *songTitle = xs_get_filetitle(&sidInf, sidInf.startSong); + *songTitle = xs_filetitle_get(&sidInf, sidInf.startSong); /* Get song length (in seconds), negative if no known length */ - *songLength = xs_get_length(songFilename, sidInf.startSong); + *songLength = xs_songlen_get(songFilename, sidInf.startSong); } diff -r d5789951b7e2 -r ac2972a7ccd5 src/xs_length.c --- a/src/xs_length.c Wed Jun 04 21:21:05 2003 +0000 +++ b/src/xs_length.c Wed Jun 04 21:22:04 2003 +0000 @@ -376,7 +376,7 @@ /* * Close song-length system */ -gint xs_songlen_close(void) +void xs_songlen_close(void) { t_xs_dbentry *pCurr, *pNext; @@ -392,8 +392,6 @@ /* Free memory allocated for indexes */ if (xs_dbindex) free(xs_dbindex); - - return 0; } diff -r d5789951b7e2 -r ac2972a7ccd5 src/xs_length.h --- a/src/xs_length.h Wed Jun 04 21:21:05 2003 +0000 +++ b/src/xs_length.h Wed Jun 04 21:22:04 2003 +0000 @@ -26,7 +26,7 @@ * Functions */ gint xs_songlen_init(void); /* Initialize songlength subsystem */ -gint xs_songlen_close(void); /* Close/shutdown */ +void xs_songlen_close(void); /* Close/shutdown */ gint32 xs_songlen_get(gchar *, gint); /* Get length in seconds */