Remove audible click sound from high frequency hopped sound
One method is to adjust the phase of the sinusoid at the beginning of each segment to minimized the 1st or 2nd delta phase difference from the phase at the end of the last segment.  Another method might adjust several samples at each boundary to minimize multiple derivatives.

You currently seem to start with a phase of zero, which could randomize the phase delta between segments, depending on frequency and segment length.