Moved the helper functions in the waveOut wrapper code so callback gets
the correct functions.