This matlab code models your work.
amplitude variation from block to block is no more than 1% and depends slightly on frequency value.The line wouldn't be absolute line at the bottom due to quantisation
and fft resolution so expect some widening at base but any extra spikes means a bug.
% sine function models analogue input
% samples taken regularly into digital domain(ADC)
% freq = 1 KHz if Fs = 8KHz
x = sin(2*pi**1/8);
%quantise for 16 bit hardware
x = round(x * (2^15-1));
% 256 points fft
% random blocks from above stream
r =round(rand(1,1)*5000);
y = fft(x(r:r+255));
y = round(y/2^7);
plot(abs(y))