Changeset 258:0bbabe034524 in roaraudio
- Timestamp:
- 07/24/08 15:55:02 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/loop.c
r257 r258 5 5 int main_loop (int driver, DRIVER_USERDATA_T driver_inst, struct roar_audio_info * sa) { 6 6 void ** streams_input = NULL; 7 uint32_t pos = 0;8 7 #ifdef MONITOR_LATENCY 9 8 struct timeval try, ans; … … 17 16 ROAR_DBG("main_loop(*) = ?"); 18 17 alive = 1; 18 g_pos = 0; 19 19 20 20 while (alive) { … … 37 37 if ( g_standby ) { 38 38 // 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); 40 40 } else { 41 if ( streams_get_mixbuffers(&streams_input, sa, pos) == 0 ) {41 if ( streams_get_mixbuffers(&streams_input, sa, g_pos) == 0 ) { 42 42 mix_clients(g_output_buffer, sa->bits, streams_input, ROAR_OUTPUT_BUFFER_SAMPLES * sa->channels); 43 43 } … … 53 53 printf("usleep(%u) = ?\n", (1000000 * ROAR_OUTPUT_BUFFER_SAMPLES) / sa->rate); 54 54 } else { 55 clients_send_filter(sa, pos);55 clients_send_filter(sa, g_pos); 56 56 output_buffer_flush(driver_inst, driver); 57 clients_send_mon(sa, pos);57 clients_send_mon(sa, g_pos); 58 58 } 59 59 60 midi_cb_update( pos);60 midi_cb_update(); 61 61 // output_buffer_reinit(); 62 62 63 pos = ROAR_MATH_OVERFLOW_ADD(pos, ROAR_OUTPUT_BUFFER_SAMPLES);63 g_pos = ROAR_MATH_OVERFLOW_ADD(g_pos, ROAR_OUTPUT_BUFFER_SAMPLES); 64 64 ROAR_DBG("main_loop(*): current pos: %u", pos); 65 65 #ifdef MONITOR_LATENCY
Note: See TracChangeset
for help on using the changeset viewer.