1 commit cee22c84e6be8ae4c89c333695fa5b50c63ea036
2 Author: Florian Ragwitz <rafl@debian.org>
3 Date: Sun Sep 30 00:15:57 2007 +0200
5 BUG(1637): honor startms.
7 diff --git a/src/xmms/output.c b/src/xmms/output.c
8 index 6f5933c..4f5e0b1 100644
9 --- a/src/xmms/output.c
10 +++ b/src/xmms/output.c
11 @@ -251,6 +251,7 @@ typedef struct {
12 xmms_output_t *output;
16 } xmms_output_song_changed_arg_t;
19 @@ -285,6 +286,21 @@ song_changed (void *data)
21 xmms_output_flush (arg->output);
23 + if (arg->startms > 0) {
25 + xmms_error_reset (&err);
27 + XMMS_DBG ("Got startms. Trying to seek to %u.", arg->startms);
29 + arg->output->filler_state = FILLER_SEEK;
30 + arg->output->filler_seek = xmms_sample_ms_to_samples (arg->output->format, arg->startms);
31 + g_cond_signal (arg->output->filler_state_cond);
33 + if (xmms_error_iserror (&err)) {
34 + XMMS_DBG ("Failed to seek to startms");
38 xmms_object_emit_f (XMMS_OBJECT (arg->output),
39 XMMS_IPC_SIGNAL_OUTPUT_CURRENTID,
40 XMMS_OBJECT_CMD_ARG_UINT32,
41 @@ -404,6 +420,8 @@ xmms_output_filler (void *arg)
42 xmms_medialib_entry_t entry;
43 xmms_output_song_changed_arg_t *arg;
44 xmms_medialib_session_t *session;
48 g_mutex_unlock (output->filler_mutex);
50 @@ -435,10 +453,21 @@ xmms_output_filler (void *arg)
54 + if (xmms_xform_metadata_get_str (chain, "startms",&tmp)) {
57 + startms = g_ascii_strtoull (tmp, &endptr, 10);
59 + if (*endptr != '\0') {
64 arg = g_new0 (xmms_output_song_changed_arg_t, 1);
67 arg->flush = last_was_kill;
68 + arg->startms = startms;
69 xmms_object_ref (chain);
71 last_was_kill = FALSE;