Changeset 258:0bbabe034524 in roaraudio


Ignore:
Timestamp:
07/24/08 15:55:02 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

globalized main_loop()'s pos to g_pos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/loop.c

    r257 r258  
    55int main_loop (int driver, DRIVER_USERDATA_T driver_inst, struct roar_audio_info * sa) { 
    66 void ** streams_input = NULL; 
    7  uint32_t pos = 0; 
    87#ifdef MONITOR_LATENCY 
    98 struct timeval         try, ans; 
     
    1716 ROAR_DBG("main_loop(*) = ?"); 
    1817 alive = 1; 
     18 g_pos = 0; 
    1919 
    2020 while (alive) { 
     
    3737  if ( g_standby ) { 
    3838   // while in standby we still neet to get the buffers to free input buffer space. 
    39    streams_get_mixbuffers(&streams_input, sa, pos); 
     39   streams_get_mixbuffers(&streams_input, sa, g_pos); 
    4040  } else { 
    41    if ( streams_get_mixbuffers(&streams_input, sa, pos) == 0 ) { 
     41   if ( streams_get_mixbuffers(&streams_input, sa, g_pos) == 0 ) { 
    4242    mix_clients(g_output_buffer, sa->bits, streams_input, ROAR_OUTPUT_BUFFER_SAMPLES * sa->channels); 
    4343   } 
     
    5353   printf("usleep(%u) = ?\n", (1000000 * ROAR_OUTPUT_BUFFER_SAMPLES) / sa->rate); 
    5454  } else { 
    55    clients_send_filter(sa, pos); 
     55   clients_send_filter(sa, g_pos); 
    5656   output_buffer_flush(driver_inst, driver); 
    57    clients_send_mon(sa, pos); 
     57   clients_send_mon(sa, g_pos); 
    5858  } 
    5959 
    60   midi_cb_update(pos); 
     60  midi_cb_update(); 
    6161//  output_buffer_reinit(); 
    6262 
    63   pos = ROAR_MATH_OVERFLOW_ADD(pos, ROAR_OUTPUT_BUFFER_SAMPLES); 
     63  g_pos = ROAR_MATH_OVERFLOW_ADD(g_pos, ROAR_OUTPUT_BUFFER_SAMPLES); 
    6464  ROAR_DBG("main_loop(*): current pos: %u", pos); 
    6565#ifdef MONITOR_LATENCY 
Note: See TracChangeset for help on using the changeset viewer.