Because the demo that I had posted worked around the issue. Modify the i loop in Button1Click as follows to remove the workaround:
for i := 0 to High(audio.FFrames) do
with audio do
begin
t := i / FSampleRate;
// yL := DecodeFrame(FFrames[i].Left);
// yR := DecodeFrame(FFrames[i].Right);
yL := FFrames[i].Left;
yR := FFrames[i].Right;
LeftChannelSeries.AddXY(t, yL);
RightChannelSeries.AddXY(t, yR);
end;
With this modification the plot of the Alarm01.wav looks as shown in the attached screenshot (and similarly for your converted sample-3s.wav). And when you zoom in you see that the negative part of the wave is shifted up to 65535. Basically this is because the file has a sample size of 16bits, and you read each sample by calling the GetU2 method of the reader. You assign the obtained word variable to the longint of the FFrames left/right channel - and this destroys the sign of the values: a $FFFF (-1) in the file becomes $0000FFFF in the FFrames (65535).
You can fix this by reading 16-bit sample files by calling the GetI2 method which reads the file values into 16-bit signed smallints and thus keeps the sign.
function TAudioWav.LoadFromStream(Str: TStream): Boolean;
...
else if FHandle.FSampleSize = 16 then begin
for i:=0 to NumFrames-1 do begin
FHandle.FFrames[i].Left := r.GetI2; //r.getU2;
if NumChannels>1 then
FHandle.FFrames[i].Right := r.GetI2; //r.getU2;
end;
end
...
Probably the same change needs to be made for the other GetU* calls in TAudioWav.LoadfromStream and probably also in the other file format readers. But I did not check this.