Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: guilib/GraphicContext.cpp
- ===================================================================
- --- guilib/GraphicContext.cpp (revision 35189)
- +++ guilib/GraphicContext.cpp (working copy)
- @@ -21,6 +21,7 @@
- #include "system.h"
- #include "GraphicContext.h"
- +#include "utils/log.h"
- #include "utils/SingleLock.h"
- #include "Application.h"
- #include "GUISettings.h"
- @@ -327,6 +328,15 @@
- CDelayedMessage* pauseMessage = new CDelayedMessage(msg, delay * 500);
- pauseMessage->Create(true);
- }
- +
- + // decrease AV delay to compensate for audio delay in low framerate modes
- + if (g_guiSettings.GetBool("videoplayer.adjustrefreshrate") && g_application.IsPlayingVideo() && g_settings.m_ResInfo[res].fRefreshRate<=26.0f)
- + {
- + CLog::Log(LOGDEBUG, "%s - Setting global audio delay to -250 ms for low fps videomodes.", __FUNCTION__);
- + g_settings.m_currentVideoSettings.m_GlobalAudioDelay = -0.25f;
- + g_application.m_pPlayer->SetAVDelay(g_settings.m_currentVideoSettings.m_AudioDelay);
- + }
- + else g_settings.m_currentVideoSettings.m_GlobalAudioDelay = 0.0f;
- if (res >= RES_DESKTOP)
- {
- Index: xbmc/cores/dvdplayer/DVDPlayer.cpp
- ===================================================================
- --- xbmc/cores/dvdplayer/DVDPlayer.cpp (revision 35189)
- +++ xbmc/cores/dvdplayer/DVDPlayer.cpp (working copy)
- @@ -2282,7 +2282,7 @@
- void CDVDPlayer::SetAVDelay(float fValue)
- {
- - m_dvdPlayerVideo.SetDelay( (fValue * DVD_TIME_BASE) ) ;
- + m_dvdPlayerVideo.SetDelay( ((fValue + g_settings.m_currentVideoSettings.m_GlobalAudioDelay) * DVD_TIME_BASE) ) ;
- }
- float CDVDPlayer::GetAVDelay()
- Index: xbmc/settings/VideoSettings.h
- ===================================================================
- --- xbmc/settings/VideoSettings.h (revision 35189)
- +++ xbmc/settings/VideoSettings.h (working copy)
- @@ -102,6 +102,7 @@
- bool m_PostProcess;
- float m_Sharpness;
- float m_AudioDelay;
- + float m_GlobalAudioDelay;
- int m_ResumeTime;
- bool m_Crop;
- int m_CropTop;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement