Changeset 5282:efca34f07bfc in roaraudio for libroardsp


Ignore:
Timestamp:
11/22/11 12:46:06 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

some ports to AVR and 8 and 16 bit archs

Location:
libroardsp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libroardsp/convert.c

    r4708 r5282  
    12251225 int i; 
    12261226 
    1227  printf("step=%f\n", step); 
     1227// printf("step=%f\n", step); 
    12281228 
    12291229 // we can not make a poly4 with less than 4 points ;) 
     
    12671267 } 
    12681268 
    1269  printf("io=%i\n", io); 
     1269// printf("io=%i\n", io); 
    12701270 
    12711271 return 0; 
  • libroardsp/filter_quantify.c

    r5270 r5282  
    4545} 
    4646 
    47 #define _calcX(bits,rshift,lshift) \ 
     47#define _calcX(bits,rshift,lshift,ibits) \ 
    4848/* this code is buggy for 8 bit filters */ \ 
    4949int roardsp_quantify_calc##bits  (struct roardsp_filter * filter, void * data, size_t samples) { \ 
     
    5252\ 
    5353 for (i = 0; i < samples; i++) { \ 
    54   samp[i]  = _calc(samp[i] rshift, filter->inst) lshift; \ 
     54  samp[i]  = (int##ibits##_t)_calc((int##ibits##_t)samp[i] rshift, filter->inst) lshift; \ 
    5555 } \ 
    5656\ 
     
    6060 
    6161/* look at our nice parameters ;) */ 
    62 _calcX(8,<< 8,>> 8) 
    63 _calcX(16,,) 
    64 _calcX(32,>> 16,<< 16) 
     62_calcX(8,<< 8,>> 8,16) 
     63_calcX(16,,,16) 
     64_calcX(32,>> 16,<< 16,32) 
    6565 
    6666int roardsp_quantify_ctl   (struct roardsp_filter * filter, int cmd, void * data) { 
Note: See TracChangeset for help on using the changeset viewer.