pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/mpc add a "playpause" command, ala "xmms -t".



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9ec65d8aa939
branches:  trunk
changeset: 474563:9ec65d8aa939
user:      mrg <mrg%pkgsrc.org@localhost>
date:      Sun May 02 07:24:51 2004 +0000

description:
add a "playpause" command, ala "xmms -t".
this has already been submitted to musicpd.org.

diffstat:

 audio/mpc/distinfo         |   5 ++++-
 audio/mpc/patches/patch-aa |  23 +++++++++++++++++++++++
 audio/mpc/patches/patch-ab |  13 +++++++++++++
 audio/mpc/patches/patch-ac |  13 +++++++++++++
 4 files changed, 53 insertions(+), 1 deletions(-)

diffs (73 lines):

diff -r a6ded12f1e8d -r 9ec65d8aa939 audio/mpc/distinfo
--- a/audio/mpc/distinfo        Sun May 02 06:28:50 2004 +0000
+++ b/audio/mpc/distinfo        Sun May 02 07:24:51 2004 +0000
@@ -1,4 +1,7 @@
-$NetBSD: distinfo,v 1.1.1.1 2004/04/30 10:49:25 grant Exp $
+$NetBSD: distinfo,v 1.2 2004/05/02 07:24:51 mrg Exp $
 
 SHA1 (mpc-0.10.3.tar.gz) = 377ea125332c27b2ba18cb22889a6a8809b2efcd
 Size (mpc-0.10.3.tar.gz) = 209661 bytes
+SHA1 (patch-aa) = 2df86841103b59e3c9c48750c895cc73ad05ae14
+SHA1 (patch-ab) = 5a8c0d963f35d1963a13d5c5354dffe4c6214e8e
+SHA1 (patch-ac) = d2492ba406a7202df2d0157f3ee728ca1bc2cc95
diff -r a6ded12f1e8d -r 9ec65d8aa939 audio/mpc/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/mpc/patches/patch-aa        Sun May 02 07:24:51 2004 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-aa,v 1.1 2004/05/02 07:24:52 mrg Exp $
+
+diff -ru src/command.c mpc-0.10.3.orig/src/command.c
+--- src/command.c      2004-03-20 10:40:02.000000000 +1100
++++ src/command.c      2004-05-02 16:49:23.000000000 +1000
+@@ -228,6 +228,17 @@
+       return 1;
+ }
+ 
++int cmd_playpause ( int argc, char ** argv, mpd_Connection * conn )
++{
++      mpd_Status * status = mpd_getStatus(conn);
++
++      if(status->state==MPD_STATUS_STATE_PLAY ||
++         status->state==MPD_STATUS_STATE_PAUSE)
++              return cmd_pause(argc,argv,conn);
++      else
++              return cmd_play(argc,argv,conn);
++}
++
+ enum SeekMode { RelForward, RelBackward, Absolute };
+ 
+       static int calculate_seek(int current_time, int change, int mode) {
diff -r a6ded12f1e8d -r 9ec65d8aa939 audio/mpc/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/mpc/patches/patch-ab        Sun May 02 07:24:51 2004 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1 2004/05/02 07:24:52 mrg Exp $
+
+diff -ru src/command.h mpc-0.10.3.orig/src/command.h
+--- src/command.h      2004-03-20 10:40:02.000000000 +1100
++++ src/command.h      2004-05-02 16:42:18.000000000 +1000
+@@ -26,6 +26,7 @@
+ int cmd_next ( int argc, char ** argv, mpd_Connection * conn );
+ int cmd_prev ( int argc, char ** argv, mpd_Connection * conn );
+ int cmd_pause ( int argc, char ** argv, mpd_Connection * conn );
++int cmd_playpause ( int argc, char ** argv, mpd_Connection * conn );
+ int cmd_stop ( int argc, char ** argv, mpd_Connection * conn );
+ int cmd_seek ( int argc, char ** argv, mpd_Connection * conn );
+ int cmd_clear ( int argc, char ** argv, mpd_Connection * conn ) ;
diff -r a6ded12f1e8d -r 9ec65d8aa939 audio/mpc/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/mpc/patches/patch-ac        Sun May 02 07:24:51 2004 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2004/05/02 07:24:52 mrg Exp $
+
+diff -ru src/main.c mpc-0.10.3.orig/src/main.c
+--- src/main.c 2004-03-20 10:44:14.000000000 +1100
++++ src/main.c 2004-05-02 16:42:03.000000000 +1000
+@@ -51,6 +51,7 @@
+       {"next", 0, 0, 0, cmd_next, "","Play the next song in the current playlist"},
+       {"prev", 0, 0, 0, cmd_prev,"","Play the previous song in the current playlist"},
+       {"pause", 0, 0, 0, cmd_pause, "", "Pauses the currently playing song"},
++      {"playpause", 0, 0, 0, cmd_playpause, "", "Pauses if playing, play otherwise"},
+       {"stop", 0, 0, 0, cmd_stop,"", "Stop the currently playing playlists"},
+       {"seek", 1, 1, 0, cmd_seek,"<0-100>","Seeks to the position specified in percent"},
+       {"clear", 0, 0, 0, cmd_clear,"", "Clear the current playlist"},



Home | Main Index | Thread Index | Old Index