Waveform generators performance


New member

I am new to microcontrollers and i am not used to create high performance code.

Looking at the library source code, the AudioSynthWaveformSine class, i have noticed that values of phase_accumulator and phase_increment class members are passed to update() function's local variables ph and inc just before generating the samples and then passed back after the samples have been generated.

Is this better for performance instead of just using the class members? Can someone explain to me like i am 5 how this works?