Ich würde es eher so machen (Spectrumanalyzer) :
Delphi-Quellcode:
var
data : array[1..255] of Single;
i : byte;
begin
Bass_ChannelGetData(stream, @data, BASS_DATA_FFT512);
Paintbox1.Canvas.FillRect(Paintbox1.ClientRect);
Paintbox1.canvas.Lineto(0, Paintbox1.height);
for i := 0 to 255 do
begin
Paintbox1.Canvas.Lineto(i, Paintbox1.Height - round( Data[i] * 200 ) );
// strtoint(formatfloat('0',450-data[i]*2000)) ); ???
end;
...