changeset 26689:4cf30c0ca561

Request a timer resolution of 1 ms on Windows, the default of between 10 and 55 ms (depending on OS version) is too inaccurate for our needs.
author reimar
date Sat, 10 May 2008 15:03:04 +0000
parents b898ca14e114
children 8aaa8fadc36c
files mplayer.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sat May 10 14:57:13 2008 +0000
+++ b/mplayer.c	Sat May 10 15:03:04 2008 +0000
@@ -688,6 +688,9 @@
 
   if (mpctx->user_muted && !mpctx->edl_muted) mixer_mute(&mpctx->mixer); 
   uninit_player(INITIALIZED_ALL);
+#ifdef WIN32
+  timeEndPeriod(1);
+#endif
 #ifdef HAVE_X11
 #ifdef HAVE_NEW_GUI
   if ( !use_gui )
@@ -2627,6 +2630,8 @@
 #endif
 
 #ifdef WIN32
+	// request 1ms timer resolution
+	timeBeginPeriod(1);
 	if(proc_priority){
 		int i;
         	for(i=0; priority_presets_defs[i].name; i++){