diff mplayer.c @ 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 0e069fe7cf0d
children d68c3cd43cd4
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++){