Lehre die PaintBox auserhalb der schleife, als0
Delphi-Quellcode:
PaintBox1.Canvas.FillRect(Form1.PaintBox1.ClientRect);
data := BassdllPlayer1.GetFFTData;
for i := 0 to 255 do Data[i] := Data[i] * ln(i + 1) * 5 * Paintbox1.ClientHeight;
for i := 0 to 255 do
begin
// diese zeile löscht den bildschirm zwar, aber dadurch flackert es!!
Paintbox1.Canvas.pen.color := clYellow;
Paintbox1.Canvas.MoveTo(i, Paintbox1.height);
Paintbox1.Canvas.lineTo(i, Paintbox1.height - round(Data[i]) - 2);
end;