| | |
i := i - $24
Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
Errr... anyone knows what this means in Delphi language?
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.
I could understand what the rest are doing but I kinda puzzled with the $24 thing...any clues?
Thanks in advance.
Pascal and Delphi Syntax (Toggle Plain Text)
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.
Pascal and Delphi Syntax (Toggle Plain Text)
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.
![]() |
Other Threads in the Pascal and Delphi Forum
- Previous Thread: Visual wave editing with delphi 7
- Next Thread: Record Files
Views: 1594 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for Pascal and Delphi





