Changeset 5282:efca34f07bfc in roaraudio


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

some ports to AVR and 8 and 16 bit archs

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • include/roaraudio/targethacks.h

    r4708 r5282  
    7373#endif 
    7474 
     75#ifndef ROAR_HAVE_CONST_M_PI_2 
     76#define M_PI_2 1.57079632679 /* pi/2 */ 
     77#endif 
     78 
    7579#endif 
    7680 
  • libroar/vio_dstr.c

    r5275 r5282  
    363363  case ROAR_VIO_DEF_TYPE_NONE: 
    364364   break; 
     365#ifdef ROAR_HAVE_IO_POSIX 
    365366  case ROAR_VIO_DEF_TYPE_FILE: 
    366367    if ( _open_file(calls, def->d.file, def->o_flags, def->o_mode) == -1 ) { 
     
    369370    } 
    370371   break; 
     372#endif 
    371373  case ROAR_VIO_DEF_TYPE_SOCKET: 
    372374     if ( roar_vio_open_def_socket(calls, def, opts) == -1 ) 
     
    382384   break; 
    383385  default: 
     386    roar_err_set(ROAR_ERROR_NOTSUP); 
    384387    return -1; 
    385388 } 
  • 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.