_oscillator_freq is a member variable but it's not initialized in the constructor.
If I understand correctly, begin(0) would then call setPWMFreq which uses that variable, and only after that it is set to the default value.
Calling setOscillatorFrequency before would probably defeat the purpose too, since it would be overwritten with the default.
_oscillator_freq is a member variable but it's not initialized in the constructor. If I understand correctly, begin(0) would then call setPWMFreq which uses that variable, and only after that it is set to the default value.
Calling setOscillatorFrequency before would probably defeat the purpose too, since it would be overwritten with the default.