Changeset 2655

Show
Ignore:
Timestamp:
07/19/99 02:07:58 (15 years ago)
Author:
ucacoxh
Message:

- Added repair_{get,set}_codec_specific for enabling and disabling

codec specific repair functions when they exist.

No intention of adding this option to RAT ui at the moment. Just
useful for some evaluation work (trivial overhead). [oth]

Location:
rat/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/repair.c

    r2579 r2655  
    4141#define FADE_DURATION   320.0f 
    4242 
     43static int  codec_specific_repair_allowed = TRUE; 
     44 
    4345static void 
    4446fade_buffer(sample *buffer, const audio_format *fmt, int consec_lost) 
     
    276278         * that first  
    277279         */ 
    278         if (codec_is_native_coding(prev->rep[0]->id) == FALSE &&  
     280        if (codec_specific_repair_allowed && 
     281            codec_is_native_coding(prev->rep[0]->id) == FALSE &&  
    279282            codec_decoder_can_repair(prev->rep[0]->id) && 
    280283            prev->rep[0]->id == missing->id) { 
     
    334337} 
    335338 
     339void 
     340repair_set_codec_specific_allowed(int allowed) 
     341{ 
     342        codec_specific_repair_allowed = allowed; 
     343} 
     344 
     345int 
     346repair_get_codec_specific_allowed(void) 
     347{ 
     348        return codec_specific_repair_allowed; 
     349} 
  • rat/trunk/repair.h

    r2346 r2655  
    2929u_int16         repair_get_by_name (const char *name); 
    3030 
     31void repair_set_codec_specific_allowed(int allowed); 
     32int  repair_get_codec_specific_allowed(void); 
     33 
    3134/* Zero is no repair mechanism */ 
    3235#define REPAIR_TYPE_NONE 2