emms-help
[Top][All Lists]
Advanced

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

Re: [emms-help] a workaround for pause, seek, etc.


From: Jorgen Schaefer
Subject: Re: [emms-help] a workaround for pause, seek, etc.
Date: Thu, 14 Jul 2005 20:14:48 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

William Xu <address@hidden> writes:

> I'd love emms someday would support pause, seek, repeat, etc, especially
> pause, which I think is quite useful. Currently i found mplayer has a
> '-slave' mode, with which to implement pause becomes quite easy. Hope
> it'll be useful for some.

Thanks!

Emms contains code to be able to plug in code as you have written.

Defining a new simple command player is easy:

(define-emms-simple-player pausing-mplayer '(file url)
  (regexp-opt '(".ogg" ".mp3" ".wav" ".mpg" ".mpeg" ".wmv" ".wma"
                ".mov" ".avi" ".divx" ".ogm" ".asf" ".mkv" "http://";))
  "mplayer" "-slave")

You can then add functionality to that player:

(emms-player-set emms-player-pausing-mplayer
                 'pause
                 'emms-player-pausing-mplayer-pause)
                 ; ^ I want a prize for that function name!

Which can be used easily:

(defun emms-pause ()
  "Pause the current player."
  (when emms-player-playing-p
    (funcall (emms-player-get emms-player-playing-p 'pause))))

etc.

The rest of the player then has to be made aware of the "paused"
state, but emms does not care otherwise. :-)

> And, do you plan to add more user-level control functions? like repeat
> current track, repeat all tracks ? These implementations would be quite 
> straightforward. I've written some myself.

I haven't found the "repeat this track" one too useful. If you
have working code, please submit it, we will add it to CVS
(probably in a new file). :-)

Greetings,
        -- Jorgen

-- 
((email . "address@hidden") (www . "http://www.forcix.cx/";)
 (gpg   . "1024D/028AF63C")   (irc . "nick forcer on IRCnet"))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]