changeset 1986:4b78df9dcf93

more set_params()
author William Pitcock <nenolod@atheme.org>
date Sun, 07 Oct 2007 14:34:40 -0500
parents a260bd1beef0
children b7bb2753677c
files src/metronom/metronom.c src/modplug/modplugbmp.cxx src/musepack/libmpc.cxx src/musepack/libmpc.h src/sexypsf/plugin.c src/sid/xmms-sid.c
diffstat 6 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/metronom/metronom.c	Sun Oct 07 14:26:26 2007 -0500
+++ b/src/metronom/metronom.c	Sun Oct 07 14:34:40 2007 -0500
@@ -201,7 +201,7 @@
 	} else {
 		name = g_strdup_printf(_("Tact generator: %d bpm %d/%d"), pmetronom->bpm,pmetronom->num,pmetronom->den);
 	}
-	metronom_ip.set_info(name, -1, 16 * 44100, 44100, 1);
+	playback->set_params(playback, name, -1, 16 * 44100, 44100, 1);
 	g_free(name);
 	playback->data = pmetronom;
 	play_thread = g_thread_self();
--- a/src/modplug/modplugbmp.cxx	Sun Oct 07 14:26:26 2007 -0500
+++ b/src/modplug/modplugbmp.cxx	Sun Oct 07 14:34:40 2007 -0500
@@ -426,8 +426,9 @@
         if ( ti )
                 aModName = format_and_free_ti( ti, &aLength );
 
-	mInPlug->set_info
+	ipb->set_params
 	(
+		ipb,
 		aModName,
 		aLength,
 		mSoundFile->GetNumChannels() * 1000,
--- a/src/musepack/libmpc.cxx	Sun Oct 07 14:26:26 2007 -0500
+++ b/src/musepack/libmpc.cxx	Sun Oct 07 14:34:40 2007 -0500
@@ -307,7 +307,7 @@
     mpcDecoder.isPause  = false;
     threadHandle = g_thread_self();
     data->set_pb_ready(data);
-    decodeStream((void *) g_strdup(data->filename));
+    decodeStream(data);
 }
 
 static void mpcStop(InputPlayback *data)
@@ -771,10 +771,10 @@
     return 0;
 }
 
-static void* decodeStream(void* data)
+static void* decodeStream(InputPlayback *data)
 {
     lockAcquire();
-    char* filename = static_cast<char*> (data);
+    char* filename = data->filename;
     VFSFile *input = aud_vfs_fopen(filename, "rb");
     if (!input)
     {
@@ -800,7 +800,7 @@
     track.channels   = info.channels;
     freeTags(tags);
 
-    MpcPlugin.set_info(track.display, track.length, track.bitrate, track.sampleFreq, track.channels);
+    data->set_params(data, track.display, track.length, track.bitrate, track.sampleFreq, track.channels);
 
     mpc_decoder decoder;
     mpc_decoder_setup(&decoder, &reader.reader);
@@ -857,7 +857,7 @@
                 counter -= status;
                 if(counter < 0)
                 {
-                    MpcPlugin.set_info(track.display, track.length, track.bitrate, track.sampleFreq, track.channels);
+                    data->set_params(data, track.display, track.length, track.bitrate, track.sampleFreq, track.channels);
                     counter = 2 * track.sampleFreq / 3;
                 }
             }
--- a/src/musepack/libmpc.h	Sun Oct 07 14:26:26 2007 -0500
+++ b/src/musepack/libmpc.h	Sun Oct 07 14:34:40 2007 -0500
@@ -125,7 +125,7 @@
 static char*      mpcGenerateTitle(const MpcInfo&, char*);
 static void       lockAcquire();
 static void       lockRelease();
-static void*      decodeStream(void*);
+static void*      decodeStream(InputPlayback*);
 static int        processBuffer(MPC_SAMPLE_FORMAT*, char*, mpc_decoder&);
 static void*      endThread(char*, FILE*, bool);
 static bool       isAlive();
--- a/src/sexypsf/plugin.c	Sun Oct 07 14:26:26 2007 -0500
+++ b/src/sexypsf/plugin.c	Sun Oct 07 14:34:40 2007 -0500
@@ -150,7 +150,7 @@
         stop = seek = 0;
 
         gchar *name = get_title_psf(data->filename);
-        sexypsf_ip.set_info(name, PSFInfo->length, 44100*2*2*8, 44100, 2);
+        data->set_params(data, name, PSFInfo->length, 44100*2*2*8, 44100, 2);
         g_free(name);
 
         playing = 1;
--- a/src/sid/xmms-sid.c	Sun Oct 07 14:26:26 2007 -0500
+++ b/src/sid/xmms-sid.c	Sun Oct 07 14:34:40 2007 -0500
@@ -403,7 +403,7 @@
 	
 	XSDEBUG("foobar #4\n");
 	XS_MUTEX_LOCK(xs_status);
-	xs_plugin_ip.set_info(
+	pb->set_params(pb,
 		tmpTitle,
 		(tmpLength > 0) ? (tmpLength * 1000) : 0,
 		-1,