changeset 1483:045eea000f6e trunk

[svn] - implement finetune seeking properly this time :)
author nenolod
date Thu, 03 Aug 2006 00:29:55 -0700
parents c371351e349c
children 57ac83a14503
files ChangeLog Plugins/Input/cue/cuesheet.c
diffstat 2 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Aug 03 00:20:53 2006 -0700
+++ b/ChangeLog	Thu Aug 03 00:29:55 2006 -0700
@@ -1,3 +1,12 @@
+2006-08-03 07:20:53 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1878]
+  - remove pointless finetune_seek stuff. didn't work right anyway, and it works better without it.
+  
+
+  Changes:        Modified:
+  +1 -29          trunk/Plugins/Input/cue/cuesheet.c  
+
+
 2006-08-03 07:15:58 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1876]
   - damn typoes
--- a/Plugins/Input/cue/cuesheet.c	Thu Aug 03 00:20:53 2006 -0700
+++ b/Plugins/Input/cue/cuesheet.c	Thu Aug 03 00:29:55 2006 -0700
@@ -50,6 +50,7 @@
 	gint index;
 } cue_tracks[MAX_CUE_TRACKS];
 static gint timeout_tag = 0;
+static gint finetune_seek = 0;
 
 static InputPlugin *real_ip = NULL;
 
@@ -249,9 +250,11 @@
 		real_ip->set_info = set_info_override;
 		real_ip->output = cue_ip.output;
 		real_ip->play_file(cue_file);
-		real_ip->seek(cue_tracks[track].index / 1000);	/* XXX: seek doesn't use frames? strange... -nenolod */
+		real_ip->seek(finetune_seek ? finetune_seek / 1000 : cue_tracks[track].index / 1000);
 	}
 
+	finetune_seek = 0;
+
 	cur_cue_track = track;
 
 	timeout_tag = gtk_timeout_add(100, watchdog_func, NULL);
@@ -288,17 +291,21 @@
 	while (time < cue_tracks[cur_cue_track].index)
 	{
 		cur_cue_track--;
+		if (!(time < cue_tracks[cur_cue_track].index))
+			finetune_seek = time;
 		playlist_prev();
 		dir = TRUE;
-		time = get_output_time() - 1000;
+		time = get_output_time();
 		g_usleep(10000);
 	}
 
 	while (dir == FALSE && cur_cue_track != last_cue_track && (time > cue_tracks[cur_cue_track + 1].index))
 	{
 		cur_cue_track++;
+		if (!(time > cue_tracks[cur_cue_track].index))
+			finetune_seek = time;
 		playlist_next();
-		time = get_output_time() + 1000;
+		time = get_output_time();
 		g_usleep(10000);
 	}