Changeset 2993:daefb5b9bc41 in roaraudio
- Timestamp:
- 10/26/09 18:28:50 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarphone.c
r2991 r2993 59 59 int64_t dtx_threshold; 60 60 size_t jumbo_mtu; 61 int ioflush_interval; 61 62 struct { 62 63 struct { … … 104 105 printf(" --server SERVER - Set server hostname\n" 105 106 " --jumbo-mtu MTU - Sets the MTU for Jumbo Packets\n" 107 " --io-flush INTERVAL - Flushs output every INTERVAL packets\n" 106 108 ); 107 109 … … 317 319 void * outbuf, * micbuf; 318 320 ssize_t outlen, miclen; 321 unsigned long int pkg_count = 0; 319 322 320 323 ROAR_DBG("run_stream(*): g_conf.samples = %i, info->bits = %i", g_conf.samples, info->bits); … … 348 351 } 349 352 353 if ( g_conf.ioflush_interval != -1 ) { 354 if ( !(pkg_count % g_conf.ioflush_interval) ) 355 roar_vio_sync(s1); 356 } 357 350 358 if ( g_conf.transcode ) { 351 359 ROAR_DBG("run_stream(*): outbuf=%p, len=%lu", outbuf, (unsigned long) len); … … 369 377 if ( roar_vio_write(s0, outbuf, outlen) != outlen ) 370 378 break; 379 380 pkg_count++; 371 381 } 372 382 … … 394 404 memset(&g_conf, 0, sizeof(g_conf)); 395 405 396 g_conf.antiecho = AE_ROARD; 397 g_conf.dtx_threshold = -1; 406 g_conf.antiecho = AE_ROARD; 407 g_conf.dtx_threshold = -1; 408 g_conf.ioflush_interval = -1; 398 409 399 410 memset(&g_cons, 0, sizeof(g_cons)); … … 412 423 } else if ( strcmp(k, "--jumbo-mtu") == 0 ) { 413 424 g_conf.jumbo_mtu = atoi(argv[++i]); 425 } else if ( strcmp(k, "--io-flush") == 0 ) { 426 g_conf.ioflush_interval = atoi(argv[++i]); 414 427 } else if ( strcmp(k, "--rate") == 0 ) { 415 428 info.rate = atoi(argv[++i]);
Note: See TracChangeset
for help on using the changeset viewer.