Changeset 1488:0dcc3be9917e in roaraudio


Ignore:
Timestamp:
03/31/09 00:10:53 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

ckeck for gettimeofday()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/loop.c

    r982 r1488  
    2929 int     term = 0; 
    3030 int     streams; 
     31#ifdef ROAR_HAVE_GETTIMEOFDAY 
    3132 long int loopc = 0; 
    3233 struct timeval         try, ans; 
    3334 float  freq; 
     35#endif 
    3436#ifdef MONITOR_LATENCY 
    3537 long int ans_1last = 0, ans_2last = 0, ans_3last = 0; 
     
    4345 g_pos = 0; 
    4446 
     47#ifdef ROAR_HAVE_GETTIMEOFDAY 
    4548 if ( sysclocksync ) { 
    4649  gettimeofday(&try, NULL); 
    4750 } 
     51#endif 
    4852 
    4953 while (alive) { 
    50 #ifdef MONITOR_LATENCY 
     54#if defined(MONITOR_LATENCY) && defined(ROAR_HAVE_GETTIMEOFDAY) 
    5155 gettimeofday(&try, NULL); 
    5256#endif 
     
    96100  g_pos = ROAR_MATH_OVERFLOW_ADD(g_pos, ROAR_OUTPUT_BUFFER_SAMPLES*g_sa->channels); 
    97101  ROAR_DBG("main_loop(*): current pos: %u", g_pos); 
    98 #ifdef MONITOR_LATENCY 
     102#if defined(MONITOR_LATENCY) && defined(ROAR_HAVE_GETTIMEOFDAY) 
    99103 gettimeofday(&ans, NULL); 
    100104 
     
    116120#endif 
    117121 
     122#ifdef ROAR_HAVE_GETTIMEOFDAY 
    118123  if ( sysclocksync && !(loopc % sysclocksync) ) { 
    119124   gettimeofday(&ans, NULL); 
     
    135140  if ( sysclocksync ) 
    136141   loopc++; 
     142#endif 
    137143 } 
    138144 
Note: See TracChangeset for help on using the changeset viewer.