aboutsummaryrefslogtreecommitdiff
path: root/emms-player-simple.el
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2006-04-12 03:51:00 +0000
committerMichael Olson <mwolson@gnu.org>2006-04-12 03:51:00 +0000
commitb18fa304660f9cf4ce66a79834763e471adf0b40 (patch)
treef10d3435f5cdf2c69456f23c79b35119e0bbbe95 /emms-player-simple.el
parent85576f435200a8a40686e78fda148cf4047fba3b (diff)
Make `emms-player-started' function, which serves the same purpose as `emms-player-stopped', in that it is meant to be called by the player. emms-player-mpd needs this so that it can tell EMMS exactly when playback has begun.
darcs-hash:20060412035132-1bfb2-d4982d0b49ca4b949c353f2702ceca4318078bb3.gz
Diffstat (limited to 'emms-player-simple.el')
-rw-r--r--emms-player-simple.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/emms-player-simple.el b/emms-player-simple.el
index 9bb8196..500289c 100644
--- a/emms-player-simple.el
+++ b/emms-player-simple.el
@@ -86,6 +86,7 @@ to call the player and ARGS are the command line arguements."
(defun ,start (track)
"Start the player process."
(emms-player-simple-start (emms-track-name track)
+ ,player-name
,command-name
,parameters))
(defun ,stop ()
@@ -108,9 +109,10 @@ to call the player and ARGS are the command line arguements."
(delete-process process))))
;; Utility-functions
-(defun emms-player-simple-start (filename cmdname params)
+(defun emms-player-simple-start (filename player cmdname params)
"Starts a process playing FILENAME using the specified CMDNAME with
-the specified PARAMS."
+the specified PARAMS.
+PLAYER is the name of the current player."
(let ((process (apply 'start-process
emms-player-simple-process-name
nil
@@ -118,7 +120,8 @@ the specified PARAMS."
;; splice in params here
(append params (list filename)))))
;; add a sentinel for signaling termination
- (set-process-sentinel process 'emms-player-simple-sentinel)))
+ (set-process-sentinel process 'emms-player-simple-sentinel))
+ (emms-player-started player))
(defun emms-player-simple-sentinel (proc str)
"Sentinel for determining the end of process"