Fiddled with it until it compiled (removed function pointer for now).  The logic probably doesn't work, though...  Also added beginnings of a test sketch.  To use, symlink lib/WaveGenerator to your Arduino libraries folder.