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