Zitat von
igel457:
Frage: Wie stellst du dir das mit dem minimal und maximalwert vor?
Folgendes Code Schnipsel ermittelt den minimal und maximalwert.
Es ist leicht, dies gleich für beide Kanäle zu tun.
Delphi-Quellcode:
YMin := 0;
YMax := 0;
for i := 0 to sample_count-1 do
begin
Ywert := SmallInt(Loword(WaveData[i+ XPos*sample_count]));
if YWert > YMax then
YMax := YWert
else if YWert < YMin then
YMin := YWert;
end;