Changeset 2443:9ecbba170d49 in roaraudio


Ignore:
Timestamp:
08/21/09 04:12:20 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

got the fader work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroardsp/fader.c

    r2441 r2443  
    4848 state->stop  = -1; 
    4949 
    50  memcpy(&(state->poly), poly, sizeof(float)*coeff); 
     50 memcpy(state->poly, poly, sizeof(float)*coeff); 
    5151 
    5252 return 0; 
     
    114114  i_e = stop  - cur; 
    115115 
    116  t_step = state->coeff/(stop - start); 
     116 t_step = (float)(state->coeff - 1)/(float)(stop - start); 
    117117 
    118118 if ( start < cur ) { 
     
    122122 } 
    123123 
     124 ROAR_DBG("roar_fader_calcpcm_i161(*): i_s->i_e: %i->%i", i_s, i_e); 
     125 
    124126 for (i = i_s; i < i_e; i++, cur++) { 
    125127  t_cur  += t_step; 
    126   g_cur   = 0; 
     128  g_cur   = roar_math_cvpoly(state->poly, t_cur, state->coeff); 
     129//  ROAR_DBG("roar_fader_calcpcm_i161(*): i=%i, g_cur=%f", i, g_cur); 
    127130  data[i] = (float)data[i] * g_cur; 
    128131 } 
Note: See TracChangeset for help on using the changeset viewer.