109 |
const unsigned int intLimit = (unsigned int) -1; // all 0xFFFF... |
const unsigned int intLimit = (unsigned int) -1; // all 0xFFFF... |
110 |
uiLevel = intLimit * phase; |
uiLevel = intLimit * phase; |
111 |
} |
} |
112 |
|
|
113 |
|
void setFrequency(float Frequency, unsigned int SampleRate) { |
114 |
|
const unsigned int intLimit = (unsigned int) -1; // all 0xFFFF... |
115 |
|
float r = Frequency / (float) SampleRate; // frequency alteration quotient |
116 |
|
c = (int) (intLimit * r); |
117 |
|
} |
118 |
|
|
119 |
protected: |
protected: |
120 |
unsigned int uiLevel; |
unsigned int uiLevel; |