[PATCH 5/9] input.c: Adding the "input_fwd5sec" and "input_back5sec" functions
Kristoffer Sederlof <[email protected]> Sat, 27 Aug 2005 23:34:25 +0300 (EEST)
| Newsgroups | gmane.comp.multimedia.xmms.devel |
|---|---|
| Message-ID | <[email protected]> |
Howdy! This patch adds the "input_fwd5sec" and "input_back5sec" functions to "xmms-1.2.10/xmms/input.c". Please consider applying. Signed-off-by: Kristoffer Sederlöf <[email protected]> --- diff -Nru ./xmms-1.2.10/xmms/input.c.orig ./xmms-1.2.10/xmms/input.c > input.c.patch --- ./xmms-1.2.10/xmms/input.c.orig 2005-08-09 23:13:44.000000000 +0300 +++ ./xmms-1.2.10/xmms/input.c 2005-08-10 22:02:45.000000000 +0300 @@ -308,6 +308,24 @@ ip_data->playing = FALSE; } +void input_fwd5sec(void) +{ + if (ip_data->playing && get_current_input_plugin()) + { + if (get_input_playing() && playlist_get_current_length() != -1) + input_seek(((((input_get_time() / 1000) + 5) < (playlist_get_current_length() / 1000)) ? ((input_get_time() / 1000) + 5) : ((playlist_get_current_length() / 1000) - 1))); + } +} + +void input_back5sec(void) +{ + if (ip_data->playing && get_current_input_plugin()) + { + if (get_input_playing() && playlist_get_current_length() != -1) + input_seek((((input_get_time() / 1000) - 5 >= 0) ? (input_get_time() / 1000) - 5 : 0)); + } +} + void input_pause(void) { if (get_input_playing() && get_current_input_plugin()) _______________________________________________ xmms-devel mailing list [email protected] http://lists.xmms.org/mailman/listinfo/xmms-devel