Changeset 31

Show
Ignore:
Timestamp:
05/08/07 23:48:50 (2 years ago)
Author:
gordonjcp
Message:

should be free of hardcoded sample rates

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nekostring/trunk/src/neko_ensemble.c

    r30 r31  
    2121  unsigned long sample; 
    2222 
     23  unsigned long sample_rate = synth->sample_rate; 
     24 
    2325  unsigned long buffer_pos = synth->buffer_pos; 
    2426 
    2527  float delay_1, delay_2, delay_3; 
    26   float xomega = 6.2831852f * (0.5 / 48000); 
    27   float yomega = 6.2831852f * (0.55 / 4800); 
    28   float dr =  0.5* 0.002 * 48000 * 0.5f; 
     28  float xomega = 6.2831852f * (0.5 / (float)sample_rate); 
     29  float yomega = 6.2831852f * (5.75 / (float)sample_rate); 
     30  float dr =  0.5* 0.002 * (float)sample_rate * 0.5f;  // FIXME - identify this bit 
    2931          float x1 = synth->ens_x1; 
    3032  float y1 = synth->ens_y1; 
    3133         
    3234        float depth1=3; 
    33         float depth2=1.5; 
     35        float depth2=1.85; 
    3436        float mix=0.75; 
    3537  float s1, s2;                 // samples from the buffer 
  • nekostring/trunk/src/neko_voice_render.c

    r30 r31  
    406406*/ 
    407407 
    408         kf = omega1/48000
     408        kf = omega1/(float)(synth->sample_rate)
    409409        // generate cello 
    410410        vco(sample_count, voice, &voice->osc_cello,