From 30d45864489ef1c741e575b7104f819ead84b9cd Mon Sep 17 00:00:00 2001 From: Johns Date: Sat, 7 Apr 2012 00:15:57 +0200 Subject: [PATCH] Change audio/video delay with hot-key. --- ChangeLog | 1 + softhddevice.cpp | 9 +++++++++ video.h | 1 + 3 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 450d7be..2be8cd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ User johns Date: Release Version 0.5.0 + Change audio/video delay with hot-key. Enable/disable/toggle fullscreen with hot-key (Feature #930). User: CafeDelMar diff --git a/softhddevice.cpp b/softhddevice.cpp index a94aaa7..6597c78 100644 --- a/softhddevice.cpp +++ b/softhddevice.cpp @@ -844,6 +844,13 @@ static void HandleHotkey(int code) case 12: // toggle pass-through CodecSetAudioPassthrough(ConfigAudioPassthrough ^= 1); break; + case 13: // decrease audio delay + VideoSetAudioDelay(VideoAudioDelay / 90 - 10); + break; + case 14: // increase audio delay + VideoSetAudioDelay(VideoAudioDelay / 90 + 10); + break; + case 20: // disable full screen VideoSetFullscreen(0); break; @@ -1779,6 +1786,8 @@ static const char *SVDRPHelpText[] = { " 10: disable audio pass-through\n" " 11: enable audio pass-through\n" " 12: toggle audio pass-through\n" + " 13: decrease audio delay by 10ms\n" + " 14: increase audio delay by 10ms\n" " 20: disable fullscreen\n" " 21: enable fullscreen\n" " 22: toggle fullscreen\n", diff --git a/video.h b/video.h index 0d5b3cd..397f5df 100644 --- a/video.h +++ b/video.h @@ -35,6 +35,7 @@ typedef struct _video_hw_decoder_ VideoHwDecoder; //---------------------------------------------------------------------------- extern char VideoIgnoreRepeatPict; ///< disable repeat pict warning +extern int VideoAudioDelay; ///< audio/video delay //---------------------------------------------------------------------------- // Prototypes