Changeset 2438

Show
Ignore:
Timestamp:
05/03/99 01:01:06 (15 years ago)
Author:
ucacoxh
Message:

- Added transmit buffer flush option for when more than 3 * mean_audio_read

is read in one go. We don't want to waste cycles encoding late audio.
This does not happen too often, usually when ui blocks, or start up
heavy process in background.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/transmit.c

    r2437 r2438  
    299299        } 
    300300         
    301         if ((double)read_dur > 5.0 * sp->tb->mean_read_dur) { 
     301        if ((double)read_dur > 3.0 * sp->tb->mean_read_dur) { 
    302302                debug_msg("Should clear transmit buffer because read_len big (%d cf %0.0f)\n", 
    303303                          read_dur, 
    304304                          sp->tb->mean_read_dur); 
     305                if (tb->sending_audio) { 
     306                        tx_stop(tb); 
     307                        tx_start(tb); 
     308                        debug_msg("Flushed transmit buffer\n"); 
     309                } 
    305310        }  
    306311