From bb4cef6a937a833c54f251f3e7a7f378e285b9b5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 26 Dec 2009 12:03:27 +0100 Subject: [PATCH] playlist/cue: fill song.start_ms, .end_ms This patch adds practical usefulness to the CUE playlist plugin. --- NEWS | 1 + src/playlist/cue_playlist_plugin.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index bf8798987..f6569a04e 100644 --- a/NEWS +++ b/NEWS @@ -77,6 +77,7 @@ ver 0.16 (20??/??/??) * log: redirect stdout/stderr to /dev/null if syslog is used * set the close-on-exec flag on all file descriptors * pcm_volume, pcm_mix: implemented 32 bit support +* CUE sheet support * obey $(sysconfdir) for default mpd.conf location * build with large file support by default * require GLib 2.12 diff --git a/src/playlist/cue_playlist_plugin.c b/src/playlist/cue_playlist_plugin.c index 27576520c..a9b596560 100644 --- a/src/playlist/cue_playlist_plugin.c +++ b/src/playlist/cue_playlist_plugin.c @@ -102,6 +102,9 @@ cue_playlist_read(struct playlist_provider *_playlist) song = song_remote_new(filename); song->tag = tag; + song->start_ms = (track_get_start(track) * 1000) / 75; + song->end_ms = ((track_get_start(track) + track_get_length(track)) + * 1000) / 75; return song; }