Projects
Eulaceura:Factory
xmms
_service:obs_scm:xmms-1.2.11-a-b.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:xmms-1.2.11-a-b.patch of Package xmms
--- xmms-1.2.11/xmms/about.c.ab 2007-11-16 23:53:41.000000000 +0100 +++ xmms-1.2.11/xmms/about.c 2007-11-18 20:57:04.000000000 +0100 @@ -79,6 +79,7 @@ static const char *credit_text[] = 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.11/xmms/main.c.ab 2006-07-16 15:40:04.000000000 +0200 +++ xmms-1.2.11/xmms/main.c 2007-11-18 21:00:06.000000000 +0100 @@ -59,7 +59,7 @@ PButton *mainwin_rew, *mainwin_play, *ma 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, +TextBox *mainwin_info, *mainwin_rate_text, *mainwin_freq_text, *mainwin_stime_min, *mainwin_ab_text, *mainwin_stime_sec; MenuRow *mainwin_menurow; HSlider *mainwin_volume, *mainwin_balance, *mainwin_position, *mainwin_sposition = NULL; @@ -83,6 +83,9 @@ static gboolean mainwin_force_redraw = F 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; @@ -262,7 +265,8 @@ enum 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); @@ -297,6 +301,9 @@ GtkItemFactoryEntry mainwin_general_menu {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>"}, @@ -2521,6 +2528,8 @@ void mainwin_eject_pushed(void) void mainwin_play_pushed(void) { + if (-1!=ab_position_a) + input_seek(ab_position_a/1000); if (get_input_paused()) { input_pause(); @@ -3065,6 +3074,25 @@ void mainwin_general_menu_callback(gpoin 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; } } @@ -3374,6 +3402,7 @@ static void mainwin_create_widgets(void) 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; @@ -3601,6 +3630,19 @@ gint idle_func(gpointer data) } 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); @@ -3697,6 +3739,8 @@ gint idle_func(gpointer data) { 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.11/README.ab.ab 2007-11-18 20:57:04.000000000 +0100 +++ xmms-1.2.11/README.ab 2007-11-18 20:57:04.000000000 +0100 @@ -0,0 +1,21 @@ +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." +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2