changeset 1984:489e32a8e106

change some places to use set_params() instead of set_info() directly
author William Pitcock <nenolod@atheme.org>
date Sun, 07 Oct 2007 14:19:19 -0500
parents 47057148c992
children a260bd1beef0
files src/aac/libmp4.c src/adplug/adplug-xmms.cc src/alac/plugin.c src/amidi-plug/amidi-plug.c src/cdaudio-ng/cdaudio-ng.c src/console/Audacious_Driver.cxx src/cue/cuesheet.c src/flacng/plugin.c
diffstat 8 files changed, 16 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/aac/libmp4.c	Sun Oct 07 01:13:02 2007 -0500
+++ b/src/aac/libmp4.c	Sun Oct 07 14:19:19 2007 -0500
@@ -518,7 +518,7 @@
     playback->output->open_audio(FMT_S16_NE, samplerate, channels);
     playback->output->flush(0);
 
-    mp4_ip.set_info(xmmstitle, msDuration,
+    playback->set_params(playback, xmmstitle, msDuration,
             mp4ff_get_avg_bitrate( mp4file, mp4track ),
             samplerate,channels);
 
@@ -695,7 +695,7 @@
         return;
     }
 
-    mp4_ip.set_info(xmmstitle, -1, -1, samplerate, channels);
+    playback->set_params(playback, xmmstitle, -1, -1, samplerate, channels);
     playback->output->flush(0);
 
     while(buffer_playing && buffervalid > 0 && streambuffer != NULL)
@@ -733,7 +733,7 @@
 
                     ostmp = stemp;
 
-                    mp4_ip.set_info(xmmstitle, -1, -1, samplerate, channels);
+                    playback->set_params(playback, xmmstitle, -1, -1, samplerate, channels);
                 }
             }
 
--- a/src/adplug/adplug-xmms.cc	Sun Oct 07 01:13:02 2007 -0500
+++ b/src/adplug/adplug-xmms.cc	Sun Oct 07 14:19:19 2007 -0500
@@ -801,7 +801,7 @@
 
   // Set XMMS main window information
   dbg_printf ("xmms, ");
-  adplug_ip.set_info (plr.songtitle, plr.songlength, freq * sampsize * 8,
+  playback->set_params (playback, plr.songtitle, plr.songlength, freq * sampsize * 8,
                       freq, stereo ? 2 : 1);
 
   // Rewind player to right subsong
--- a/src/alac/plugin.c	Sun Oct 07 01:13:02 2007 -0500
+++ b/src/alac/plugin.c	Sun Oct 07 14:19:19 2007 -0500
@@ -349,7 +349,7 @@
 	(float)(demux_res.sample_rate / 251));
 
     playback->output->open_audio(FMT_S16_LE, demux_res.sample_rate, demux_res.num_channels);
-    alac_ip.set_info(title, duration, -1, demux_res.sample_rate, demux_res.num_channels);
+    playback->set_params(playback, title, duration, -1, demux_res.sample_rate, demux_res.num_channels);
 
     /* will convert the entire buffer */
     GetBuffer(&demux_res);
--- a/src/amidi-plug/amidi-plug.c	Sun Oct 07 01:13:02 2007 -0500
+++ b/src/amidi-plug/amidi-plug.c	Sun Oct 07 14:19:19 2007 -0500
@@ -445,7 +445,7 @@
       /* our length is in microseconds, but the player wants milliseconds */
       filename = g_filename_from_uri( filename_uri , NULL , NULL );
       if ( !filename ) filename = g_strdup( filename_uri );
-      amidiplug_ip.set_info( G_PATH_GET_BASENAME(filename) ,
+      playback->set_params( playback , G_PATH_GET_BASENAME(filename) ,
                              (gint)(midifile.length / 1000) ,
                              au_bitdepth * au_samplerate * au_channels / 8 ,
                              au_samplerate , au_channels );
--- a/src/cdaudio-ng/cdaudio-ng.c	Sun Oct 07 01:13:02 2007 -0500
+++ b/src/cdaudio-ng/cdaudio-ng.c	Sun Oct 07 14:19:19 2007 -0500
@@ -510,7 +510,7 @@
 	tuple = create_aud_tuple_from_trackinfo(pinputplayback->filename);
 	title = aud_tuple_formatter_make_title_string(tuple, get_gentitle_format());
 
-	inputplugin.set_info(title, calculate_track_length(trackinfo[trackno].startlsn, trackinfo[trackno].endlsn), 1411200, 44100, 2);
+	pinputplayback->set_params(pinputplayback, title, calculate_track_length(trackinfo[trackno].startlsn, trackinfo[trackno].endlsn), 1411200, 44100, 2);
 	g_free(title);
 	aud_tuple_free(tuple);
 
--- a/src/console/Audacious_Driver.cxx	Sun Oct 07 01:13:02 2007 -0500
+++ b/src/console/Audacious_Driver.cxx	Sun Oct 07 14:19:19 2007 -0500
@@ -377,7 +377,7 @@
 			char* title = format_and_free_ti( ti, &length );
 			if ( title )
 			{
-				console_ip.set_info( title, length, fh.emu->voice_count() * 1000, sample_rate, 2 );
+				playback->set_params( playback, title, length, fh.emu->voice_count() * 1000, sample_rate, 2 );
 				g_free( title );
 			}
 		}
--- a/src/cue/cuesheet.c	Sun Oct 07 01:13:02 2007 -0500
+++ b/src/cue/cuesheet.c	Sun Oct 07 14:19:19 2007 -0500
@@ -487,6 +487,13 @@
 		real_ip->pb_ready_val = data->pb_ready_val;
 		real_ip->set_pb_ready = data->set_pb_ready;
 
+		real_ip->pb_change_mutex = data->pb_change_mutex;
+		real_ip->pb_change_cond = data->pb_change_cond;
+		real_ip->set_pb_change = data->set_pb_change;
+
+		real_ip->set_params = data->set_params;
+		real_ip->set_title = data->set_title;
+
 		real_play_thread = g_thread_create((GThreadFunc)(real_ip->plugin->play_file), (gpointer)real_ip, TRUE, NULL);
 		g_usleep(50000); // wait for 50msec while real input plugin is initializing.
 
--- a/src/flacng/plugin.c	Sun Oct 07 01:13:02 2007 -0500
+++ b/src/flacng/plugin.c	Sun Oct 07 14:19:19 2007 -0500
@@ -558,7 +558,7 @@
 
     input->playing = TRUE;
 
-    flac_ip.set_info(get_title(input->filename, main_info), l, -1, main_info->stream.samplerate, main_info->stream.channels);
+    input->set_params(input, get_title(input->filename, main_info), l, -1, main_info->stream.samplerate, main_info->stream.channels);
 
     thread = g_thread_self();
     input->set_pb_ready(input);