Changeset 36:c5d92dd968cd in roaraudio for roard/loop.c
- Timestamp:
- 06/22/08 15:45:40 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/loop.c
r9 r36 9 9 struct timeval try, ans; 10 10 long int ans_1last = 0, ans_2last = 0, ans_3last = 0; 11 long int loopc = 0; 11 12 12 13 printf("\n\e[s"); … … 47 48 if ( g_standby ) { 48 49 usleep((1000000 * ROAR_OUTPUT_BUFFER_SAMPLES) / sa->rate); 50 printf("usleep(%li) = ?\n", (1000000 * ROAR_OUTPUT_BUFFER_SAMPLES) / sa->rate); 49 51 } else { 50 52 clients_send_filter(sa, pos); … … 65 67 ans.tv_usec -= try.tv_usec; 66 68 67 if ( pos % 3) {69 if ( loopc % 128 ) { 68 70 printf("\e[ucurrent latency: %.3fms average: %.3fms ", ans.tv_usec / (double)1000, 69 71 (ans.tv_usec+ans_3last+ans_2last+ans_1last)/ (double)4000); … … 74 76 ans_2last = ans_1last; 75 77 ans_1last = ans.tv_usec; 78 loopc++; 76 79 #endif 77 80 }
Note: See TracChangeset
for help on using the changeset viewer.