blob: 917030cad519b849a5dd1c2c285607b0b99179ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// member variables end here
};
//this function returns the smallest phase_init possible for a
//given custom_wave which is greater or equal than PHASE_INIT
#define PHASE_INIT 100
inline fixed_t init_custom_osc_phase(int len, fixed_t sr)
{
return ( (fixed_t(ceil( float(PHASE_INIT) * sr / len / ONE )) *len << (2*SCALE)) / sr);
}
|