changeset 602:20b8e735f69e trunk

[svn] - adaptation for playback API. make cuesheet plugin pass playback->output to real_ip.
author yaz
date Sat, 03 Feb 2007 08:55:23 -0800
parents 45c9130027d9
children 73ae7a6d510e
files ChangeLog src/cue/cuesheet.c
diffstat 2 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Feb 02 14:42:27 2007 -0800
+++ b/ChangeLog	Sat Feb 03 08:55:23 2007 -0800
@@ -1,3 +1,11 @@
+2007-02-02 22:42:27 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1288]
+  - handle unavailable tuples better
+  
+  trunk/src/scrobbler/plugin.c |    6 ++++++
+  1 file changed, 6 insertions(+)
+
+
 2007-02-02 21:43:43 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1286]
   - forgot to svn add
--- a/src/cue/cuesheet.c	Fri Feb 02 14:42:27 2007 -0800
+++ b/src/cue/cuesheet.c	Sat Feb 03 08:55:23 2007 -0800
@@ -136,10 +136,7 @@
 
 static gint get_time(InputPlayback *playback)
 {
-	if (real_ip)
-		return real_ip->plugin->get_time(real_ip);
-
-	return -1;
+	return playback->output->output_time();
 }
 
 static void play(InputPlayback *data)
@@ -325,6 +322,11 @@
 		real_ip->plugin->set_info = set_info_override;
 		real_ip->plugin->output = cue_ip.output;
 		real_ip->filename = cue_file;
+
+		/* need to pass playback->output to real_ip */
+		real_ip->output = data->output;
+		real_ip->data = data->data;
+
 		real_ip->plugin->play_file(real_ip);
 		real_ip->plugin->seek(real_ip, finetune_seek ? finetune_seek / 1000 : cue_tracks[track].index / 1000 + 1);
 		// in some plugins, NULL as 2nd arg causes crash.