[Top][All Lists]

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

Re: [emms-help] Restore playback position

From: Yoni Rabkin
Subject: Re: [emms-help] Restore playback position
Date: Thu, 26 Oct 2017 08:09:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Pierre Neidhardt <address@hidden> writes:

> Yoni Rabkin <address@hidden> writes:
>> For instance, an option that (when enabled): if there are bookmarks in
>> the track being played, jump to the last bookmark.
> Yes, a per-track solution is more ideal than my quick&dirty hack.
> I went through this a long time ago and I don't remember well, but I had
> tried bookmarks and it simply did not cut it.  I'll investigate again.
> That being said, I don't think this would solve the issue of the race
> condition:
>   (when (not emms-player-playing-p)
>     (emms-start))
>   (let ((m (funcall search-f emms-playing-time track)))
>     (if m
>       (progn
>         (emms-player-seek-to (cdr m))
>         (message "%s" (car m)))
>       (message "%s" failure-message))))
> The above code suffers from the same issue: it does not wait until the
> executable and the music file have entered a state where they can "seek".
> I think an optional `seek-to` added to `emms-start` would solve this.
> Let me know.

I can't think of a clean way of doing that, and in any case `emms-start'
is just an `interactive' wrapper and would the wrong place to start
thinking of this.

Can you describe the use case? I'm assuming this is for podcasts or
spoken word stuff (pop songs don't need this, and one normally doesn't
start in the middle of a classical movement (shudder)) I'm not doubting
the validity of the need for this; it's just that I would have an easier
time thinking about it if I knew the specific use.

Right now I'm thinking about a function registered with
`emms-player-started-hook' to call seek-to.

If it critical that the player actually start at that time, as opposed
to start and then seek, it may be necessary to make a
`define-emms-simple-player' with the right command line stuff at process

   "Cut your own wood and it will warm you twice"

reply via email to

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