Changeset 2429:ec88a52431e4 in roaraudio


Ignore:
Timestamp:
08/19/09 05:24:14 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

get freq

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroardsp/synth.c

    r2428 r2429  
    7878 float t_step; 
    7979 float t_cur; 
     80 float freq; 
    8081 int i; 
    8182 
     
    8687 t_cur  = t_step * state->pcmoffset; 
    8788 
     89 freq   = state->note->freq; 
     90 
    8891 for (i = 0; i < frames; i++, t_cur += t_step) { 
    89   out[i] = 32767.0*state->func(t_cur, state); 
     92  out[i] = 32767.0*state->func(2.0*M_PI*freq*t_cur, state); 
    9093 } 
    9194 
Note: See TracChangeset for help on using the changeset viewer.