From c5c9b1b42e35596f3c5460bc3f0aee9eb6d16d4a Mon Sep 17 00:00:00 2001 From: phintuka Date: Tue, 1 Jan 2008 08:25:02 +0000 Subject: Hotkeys for audio delay (Patch from Timo Eskola) --- menu.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/menu.c b/menu.c index c55eda03..628612c5 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: menu.c,v 1.43 2007-09-18 14:02:38 phintuka Exp $ + * $Id: menu.c,v 1.44 2008-01-01 08:25:02 phintuka Exp $ * */ @@ -41,6 +41,8 @@ # define HOTKEY_PLAYLIST k9 /* Start replaying playlist or file pointed by symlink $(CONFDIR)/plugins/xineliboutput/default_playlist */ +# define HOTKEY_ADELAY_UP kUp /* audio delay up */ +# define HOTKEY_ADELAY_DOWN kDown /* audio delay down */ #endif //#define OLD_SPU_MENU @@ -1079,6 +1081,32 @@ eOSState cMenuXinelib::ProcessHotkey(eKeys Key) } break; + case HOTKEY_ADELAY_UP: + /* audio delay up */ + if(!OnlyInfo) { + xc.audio_delay++; + cXinelibDevice::Instance().ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, + xc.audio_compression, xc.audio_equalizer, + xc.audio_surround, xc.speaker_type); + } + asprintf(&Message, "%s %s %d %s", tr("Delay"), + OnlyInfo ? ":" : "->", + xc.audio_delay, tr("ms")); + break; + + case HOTKEY_ADELAY_DOWN: + /* audio delay up */ + if(!OnlyInfo) { + xc.audio_delay--; + cXinelibDevice::Instance().ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, + xc.audio_compression, xc.audio_equalizer, + xc.audio_surround, xc.speaker_type); + } + asprintf(&Message, "%s %s %d %s", tr("Delay"), + OnlyInfo ? ":" : "->", + xc.audio_delay, tr("ms")); + break; + default: asprintf(&Message, tr("xineliboutput: hotkey %s not binded"), cKey::ToString(Key)); break; -- cgit v1.2.3