From: Miguel F. <mig...@us...> - 2004-10-29 23:11:59
|
Update of /cvsroot/xine/xine-lib/src/post/audio In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13163/src/post/audio Modified Files: stretch.c Log Message: use monotonic clock when available Index: stretch.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/post/audio/stretch.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- stretch.c 2 Aug 2004 12:51:11 -0000 1.4 +++ stretch.c 29 Oct 2004 23:11:38 -0000 1.5 @@ -71,7 +71,7 @@ int64_t pts; double pts_calc; - gettimeofday(&tv, NULL); + xine_monotonic_clock(&tv, NULL); pts_calc = (tv.tv_sec - this->cur_time.tv_sec) * this->speed_factor; pts_calc += (tv.tv_usec - this->cur_time.tv_usec) * this->speed_factor / 1e6; pts = this->cur_pts + pts_calc; @@ -107,7 +107,7 @@ pthread_mutex_lock (&this->lock); - gettimeofday(&tv, NULL); + xine_monotonic_clock(&tv, NULL); this->cur_time.tv_sec=tv.tv_sec; this->cur_time.tv_usec=tv.tv_usec; this->cur_pts = vpts; @@ -120,7 +120,7 @@ pthread_mutex_lock (&this->lock); - gettimeofday(&this->cur_time, NULL); + xine_monotonic_clock(&this->cur_time, NULL); this->cur_pts = start_vpts; pthread_mutex_unlock (&this->lock); @@ -136,7 +136,7 @@ double pts_calc; pthread_mutex_lock (&this->lock); - gettimeofday(&tv, NULL); + xine_monotonic_clock(&tv, NULL); pts_calc = (tv.tv_sec - this->cur_time.tv_sec) * this->speed_factor; pts_calc += (tv.tv_usec - this->cur_time.tv_usec) * this->speed_factor / 1e6; |