I don't see how that library can possible work. The initialization of the sampling rate, sample size and target tone looks fine. But Goertzel.sample just reads N samples as fast as it can without any attempt to do the sampling at the rate you've specified. It would need to have the correct delay between each sample for this to work.
Pete