changeset 22:ac2972a7ccd5

Fixed typos and stuff.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 04 Jun 2003 21:22:04 +0000
parents d5789951b7e2
children 469efc05e01e
files src/xmms-sid.cc src/xs_length.c src/xs_length.h
diffstat 3 files changed, 16 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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 <sidplay/player.h>
 #include <sidplay/myendian.h>
 #include <sidplay/fformat.h>
@@ -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);
 }
 
--- 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;
 }
 
 
--- 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 */