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