From f064187bb1e7a4cc4e829899f6e7785e09db6aa9 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sat, 6 Dec 2014 22:05:35 +0100 Subject: [PATCH] Set the system timer precision to 1 ms while encoding, because this seems to improve encoding performance quite a bit. Will be reset to default, when encoding is done, so LameXP won't "eat the battery" while idle. --- LameXP_VS2013.sln | 3 --- src/Config.h | 2 +- src/Tool_Abstract.cpp | 8 ++++++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/LameXP_VS2013.sln b/LameXP_VS2013.sln index da57aa1f..aa056c20 100644 --- a/LameXP_VS2013.sln +++ b/LameXP_VS2013.sln @@ -33,7 +33,4 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection EndGlobal diff --git a/src/Config.h b/src/Config.h index a52c269a..fa220993 100644 --- a/src/Config.h +++ b/src/Config.h @@ -35,7 +35,7 @@ #define VER_LAMEXP_MINOR_LO 1 #define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_PATCH 5 -#define VER_LAMEXP_BUILD 1619 +#define VER_LAMEXP_BUILD 1621 #define VER_LAMEXP_CONFG 1558 /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Tool_Abstract.cpp b/src/Tool_Abstract.cpp index b4f3534a..2d7a9bbb 100644 --- a/src/Tool_Abstract.cpp +++ b/src/Tool_Abstract.cpp @@ -75,6 +75,10 @@ AbstractTool::AbstractTool(void) { s_jobObjectInstance.reset(new JobObject()); s_startProcessTimer.reset(new QElapsedTimer()); + if(!MUtils::OS::setup_timer_resolution()) + { + qWarning("Failed to setup system timer resolution!"); + } } } @@ -89,6 +93,10 @@ AbstractTool::~AbstractTool(void) { s_jobObjectInstance.reset(NULL); s_startProcessTimer.reset(NULL); + if(!MUtils::OS::reset_timer_resolution()) + { + qWarning("Failed to reset system timer resolution!"); + } } }