Errr... anyone knows what this means in Delphi language?
:sad:
i : integer;
i := i - $24;
It's actually in a function that completes a WAV file header something similar to the Microsoft's RIFF specification for WAV. The code goes something like this.
procedure TForm1.StopRecording;
var
i: integer;
begin
BASS_ChannelStop(rchan);
bRecord.Caption := 'Record';
WaveStream.Position := 4;
i := WaveStream.Size - 8;
WaveStream.Write(i, 4);
i := i - $24;
WaveStream.Position := 40;
WaveStream.Write(i, 4);
WaveStream.Position := 0;
// create a stream from the recorded data
chan := BASS_StreamCreateFile(True, WaveStream.Memory, 0, WaveStream.Size, 0);
if chan <> 0 then
begin
// enable "Play" & "Save" buttons
bPlay.Enabled := True;
bSave.Enabled := True;
end
else
MessageDlg('Error creating stream from recorded data!', mtError, [mbOk], 0);
end;
I could understand what the rest are doing but I kinda puzzled with the $24 thing...any clues?
Thanks in advance.