The offset into the planar_buffer was not being stored, so any time multiple iterations occured the beginning of the wave was copied again, instead of correctly copying the next part of the planar_buffer.