getFrequency() method returns a floating point number, but the number is a result of integer division converted to floating point. Hence the return value is always integer albeit in floating point format.
Issue is on line 126 of the source module: frequency = (float)(sampleRate / period);
See discussion at https://forum.arduino.cc/index.php?topic=716159.msg4813625;topicseen#msg4813625