Optimize more by avoiding floating point
This commit is contained in:
@@ -107,6 +107,7 @@ public:
|
||||
float value = 0.0f; // Current output sample
|
||||
float next_value = 0.0f; // For double-buffering in processGridStep
|
||||
float phase = 0.0f; // For Oscillator, Noise state
|
||||
uint32_t phase_accumulator = 0; // For Oscillators (Fixed point optimization)
|
||||
};
|
||||
|
||||
static const int GRID_W = 12;
|
||||
@@ -131,6 +132,7 @@ private:
|
||||
uint32_t _increment; // Phase increment per sample, determines frequency.
|
||||
float _volume;
|
||||
Waveform _waveform;
|
||||
float _freqToPhaseInc; // Pre-calculated constant for frequency to phase increment conversion
|
||||
bool _isGateOpen;
|
||||
uint32_t _rngState;
|
||||
std::vector<std::pair<int, int>> _processing_order;
|
||||
|
||||
Reference in New Issue
Block a user