Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 2b471379494a2acc128492c7574ce12f > files > 30

xmms-1.2.10-35mdv2008.0.src.rpm

--- xmms-1.2.9-pre1/xmms/about.c.ab	2004-01-17 01:41:21.000000000 +0100
+++ xmms-1.2.9-pre1/xmms/about.c	2004-01-17 21:03:02.000000000 +0100
@@ -75,6 +75,7 @@
 	N_("Chris Wilson"),
 	N_("Dave Yearke"),
 	N_("Stephan K. Zitz"),
+	N_("Rodrigo Martins de Matos Ventura (the A-B patch)"),
 	NULL,
  N_("Default skin:"),
  	N_("Leonard \"Blayde\" Tan"),
--- xmms-1.2.9-pre1/xmms/main.c.ab	2004-01-17 01:11:36.000000000 +0100
+++ xmms-1.2.9-pre1/xmms/main.c	2004-01-17 21:10:07.000000000 +0100
@@ -56,8 +56,8 @@
 SButton *mainwin_srew, *mainwin_splay, *mainwin_spause, *mainwin_sstop,
        *mainwin_sfwd, *mainwin_seject, *mainwin_about;
 TButton *mainwin_shuffle, *mainwin_repeat, *mainwin_eq, *mainwin_pl;
-TextBox *mainwin_info, *mainwin_rate_text, *mainwin_freq_text, *mainwin_stime_min,
-       *mainwin_stime_sec;
+TextBox *mainwin_info, *mainwin_rate_text, *mainwin_freq_text, *mainwin_ab_text,
+       *mainwin_stime_min,*mainwin_stime_sec;
 MenuRow *mainwin_menurow;
 HSlider *mainwin_volume, *mainwin_balance, *mainwin_position, *mainwin_sposition = NULL;
 MonoStereo *mainwin_monostereo;
@@ -80,6 +80,9 @@
 static gchar *mainwin_title_text = NULL;
 static gboolean mainwin_info_text_locked = FALSE;
 
+static int ab_position_a = -1;
+static int ab_position_b = -1;
+
 /* For x11r5 session management */
 static char **restart_argv;
 static int restart_argc;
@@ -257,7 +260,8 @@
 	MAINWIN_GENERAL_STOPFADE, MAINWIN_GENERAL_BACK5SEC,
 	MAINWIN_GENERAL_FWD5SEC, MAINWIN_GENERAL_START, MAINWIN_GENERAL_BACK10,
 	MAINWIN_GENERAL_FWD10, MAINWIN_GENERAL_JTT, MAINWIN_GENERAL_JTF,
-	MAINWIN_GENERAL_CQUEUE, MAINWIN_GENERAL_EXIT
+	MAINWIN_GENERAL_CQUEUE, MAINWIN_GENERAL_EXIT, 
+	MAINWIN_GENERAL_SETAB, MAINWIN_GENERAL_CLEARAB
 };
 
 void mainwin_general_menu_callback(gpointer cb_data, guint action, GtkWidget * w);
@@ -292,6 +296,9 @@
 	{N_("/Playback/-"), NULL, NULL, 0, "<Separator>"},
 	{N_("/Playback/Jump to Time"), "<control>J", mainwin_general_menu_callback, MAINWIN_GENERAL_JTT, "<Item>"},
 	{N_("/Playback/Jump to File"), "J", mainwin_general_menu_callback, MAINWIN_GENERAL_JTF, "<Item>"},
+	{N_("/Playback/-"), NULL, NULL, 0, "<Separator>"},
+        {N_("/Playback/Set A-B"), "A", mainwin_general_menu_callback, MAINWIN_GENERAL_SETAB, "<Item>"},
+        {N_("/Playback/Clear A-B"), "S", mainwin_general_menu_callback, MAINWIN_GENERAL_CLEARAB, "<Item>"},
 	{N_("/Playback/Clear Queue"), "<shift>Q", mainwin_general_menu_callback, MAINWIN_GENERAL_CQUEUE, "<Item>"},
 	{N_("/Visualization"), NULL, NULL, 0, "<Item>"},
 	{N_("/-"), NULL, NULL, 0, "<Separator>"},
@@ -2013,6 +2020,8 @@
 
 void mainwin_play_pushed(void)
 {
+        if (-1!=ab_position_a)
+                input_seek(ab_position_a/1000);
 	if (get_input_paused())
 	{
 		input_pause();
@@ -2544,6 +2553,25 @@
 	case MAINWIN_GENERAL_EXIT:
 		mainwin_quit_cb();
 		break;
+        case MAINWIN_GENERAL_SETAB:
+                if (playlist_get_current_length() != -1)
+                        if (-1==ab_position_a) {
+              			ab_position_a = input_get_time();
+              			ab_position_b = -1;
+            		} else if (-1==ab_position_b) {
+                                int time=input_get_time();
+                                if (time>ab_position_a) ab_position_b=time;
+        		} else {
+              			ab_position_a = input_get_time();
+              			ab_position_b = -1;
+            		}
+                break;
+        case MAINWIN_GENERAL_CLEARAB:
+                if (playlist_get_current_length() != -1) {
+                        ab_position_a = -1;
+                        ab_position_b = -1;
+                }
+                break;
 	}
 }
 
@@ -2852,6 +2880,7 @@
 	textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font);
 	mainwin_rate_text = create_textbox(&mainwin_wlist, mainwin_bg, mainwin_gc, 111, 43, 15, 0, SKIN_TEXT);
 	mainwin_freq_text = create_textbox(&mainwin_wlist, mainwin_bg, mainwin_gc, 156, 43, 10, 0, SKIN_TEXT);
+	mainwin_ab_text = create_textbox(&mainwin_wlist, mainwin_bg, mainwin_gc, 195, 43, 15, 0, SKIN_TEXT);
 
 	mainwin_menurow = create_menurow(&mainwin_wlist, mainwin_bg, mainwin_gc, 10, 22, 304, 0, 304, 44, mainwin_mr_change, mainwin_mr_release, SKIN_TITLEBAR);
 	mainwin_menurow->mr_doublesize_selected = cfg.doublesize;
@@ -3069,6 +3098,19 @@
 		}
 		else
 		{
+                        if ( -1!=ab_position_a ) {
+                                if ( -1!=ab_position_b ) {
+                                        textbox_set_text(mainwin_ab_text, "A-B");
+                                        if ( time>ab_position_b ) {
+                                                input_seek(ab_position_a/1000);
+                                        }
+                                } else {
+                                        textbox_set_text(mainwin_ab_text, "A- ");
+                                }
+                        } else {
+                                textbox_set_text(mainwin_ab_text, "   ");
+                        }
+
 			length = playlist_get_current_length();
 			playlistwin_set_time(time, length, cfg.timer_mode);
 			input_update_vis(time);
@@ -3147,6 +3189,8 @@
 	{
 		GDK_THREADS_ENTER();
 		vis_playback_stop();
+                if (-1!=ab_position_a) ab_position_a=-1;
+                if (-1!=ab_position_b) ab_position_b=-1;
 		GDK_THREADS_LEAVE();
 	}
 
--- xmms-1.2.9-pre1/README.MDK.ab	2004-01-17 21:03:02.000000000 +0100
+++ xmms-1.2.9-pre1/README.MDK	2004-01-17 21:03:02.000000000 +0100
@@ -0,0 +1,24 @@
+Additional features for the Mandrake Linux XMMS package.
+
+
+The A-B feature
+---------------
+
+The A-B feature by Rodrigo Martins de Matos Ventura was found here:
+http://lists.xmms.org/pipermail/xmms-devel/2002-January/002282.html
+And was rediffed by Oden Eriksson Tue 18 Nov 2003.
+
+Here's Rodrigos explaination what it is about:
+
+"I just did a minor patch to CVS version of xmms, in order to
+add a small but very useful (at least to me) feature: A-B
+repetition. My old CD player has it, and it is extremely useful,
+namely for transcribing music.
+
+The idea is simple: anytime during play, you press the "A" key
+(marks A point), the music keeps playing, when you press the "A" key
+again (marks B point), it loops endlessly between the two marked
+points, until the "S" key is pressed (clear), or a new A point is
+marked. Morover, whenever a A-B range is defined, the "play"
+button/menu jumps straight to the A position."
+