[BACK]Return to aparams.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / aucat

Diff for /src/usr.bin/aucat/Attic/aparams.c between version 1.2 and 1.3

version 1.2, 2008/10/26 08:49:43 version 1.3, 2008/11/03 22:25:13
Line 183 
Line 183 
 }  }
   
 /*  /*
  * Return true if both parameters are the same.   * Return true if both encodings are the same.
  */   */
 int  int
 aparams_eq(struct aparams *par1, struct aparams *par2)  aparams_eqenc(struct aparams *par1, struct aparams *par2)
 {  {
         if (par1->bps != par2->bps ||          if (par1->bps != par2->bps ||
             par1->bits != par2->bits ||              par1->bits != par2->bits ||
             par1->sig != par2->sig ||              par1->sig != par2->sig)
             par1->cmin != par2->cmin ||  
             par1->cmax != par2->cmax ||  
             par1->rate != par2->rate)  
                 return 0;                  return 0;
         if ((par1->bits != 8 * par1->bps) && par1->msb != par2->msb)          if ((par1->bits != 8 * par1->bps) && par1->msb != par2->msb)
                 return 0;                  return 0;
Line 201 
Line 198 
                 return 0;                  return 0;
         return 1;          return 1;
 }  }
   
   /*
    * Return true if both parameters are the same.
    */
   int
   aparams_eq(struct aparams *par1, struct aparams *par2)
   {
           if (!aparams_eqenc(par1, par2) ||
               par1->cmin != par2->cmin ||
               par1->cmax != par2->cmax ||
               par1->rate != par2->rate)
                   return 0;
           return 1;
   }
   
   /*
    * Retrurn true if first channel range includes second range
    */
   int
   aparams_subset(struct aparams *subset, struct aparams *set)
   {
           return subset->cmin >= set->cmin && subset->cmax <= set->cmax;
   }
   
   /*
    * Return true if rates are the same
    */
   int
   aparams_eqrate(struct aparams *p1, struct aparams *p2)
   {
           /* XXX: allow 1/9 halftone of difference */
           return p1->rate == p2->rate;
   }
   
   
 /*  /*
  * Return the number of bytes per frame with the given parameters.   * Return the number of bytes per frame with the given parameters.

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3