aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorforcer <forcer>2005-09-12 15:22:00 +0000
committerforcer <mwolson@gnu.org>2005-09-12 15:22:00 +0000
commit03055c8e7e2c4bd1a62529af1273bedbf803d7c9 (patch)
treefcd5fc30ba3a6cf8c96f705935cd76ef322c333e
parent79dc6ebe7d16b3a85f90e1846bf31c0e4e5629a8 (diff)
Add pause and resume to the simple player.
darcs-hash:20050912152217-2189f-f2dbdea100c53cfe38fa47fc65d235eb1bf80323.gz
-rw-r--r--emms-player-simple.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/emms-player-simple.el b/emms-player-simple.el
index a45c6eb..92b9540 100644
--- a/emms-player-simple.el
+++ b/emms-player-simple.el
@@ -80,6 +80,8 @@ to call the player and ARGS are the command line arguements."
,(concat "*A player for EMMS.")
:type '(cons symbol alist))
(emms-player-set ,player-name 'regex ,regex)
+ (emms-player-set ,player-name 'pause 'emms-player-simple-pause)
+ (emms-player-set ,player-name 'resume 'emms-player-simple-resume)
(defun ,start (track)
"Start the player process."
(emms-player-simple-start (emms-track-name track)
@@ -123,6 +125,16 @@ the specified PARAMS."
(eq (process-status proc) 'signal))
(emms-player-stopped)))
+(defun emms-player-simple-pause ()
+ "Pause the player by sending a SIGSTOP."
+ (signal-process (get-process emms-player-simple-process-name)
+ 'SIGSTOP))
+
+(defun emms-player-simple-resume ()
+ "Resume the player by sending a SIGCONT."
+ (signal-process (get-process emms-player-simple-process-name)
+ 'SIGCONT))
+
(define-emms-simple-player mpg321 '(file url) "\\.[mM][pP][23]$" "mpg321")
(define-emms-simple-player ogg123 '(file) (regexp-opt '(".ogg" ".OGG" ".FLAC" ".flac")) "ogg123")
(define-emms-simple-player speexdec '(file) "\\.[sS][pP][xX]$" "speexdec")