{ Program : WAV Header Info Programer : FARZAD BADILI (FDB@bigfoot.com) http://www.inernettrash.com/users/fdb/ } uses crt,dos; TYPE WavHeader = record RiffID : array [1..4] of char; {"RIFF"} RiffLength : LONGINT; WavID : array [1..4] of char; {"WAVE"} FmtID : array [1..4] of char; {"fmt "} FmtLength : LONGINT; WavFormatTag : INTEGER; {1 = PCM} Channels : INTEGER; {1 = mono, 2 = stereo } SamplesPerSec : LONGINT; { Samples per Second } BytesPerSec : LONGINT; { Bytes Per Second } BlockAlign : INTEGER; FmtSpecific : INTEGER; {Padding : array [1..4] of char; { only valid if FmtLength = 16 } DataID : array [1..4] of char; {"data"} DataLength : LONGINT; END; VAR wavfile : WavHeader; wfile : string; f : file; rr : word; begin CLRSCR; write ('File: '); readln (WFile); assign (f,wfile); reset (f,1); IF Filesize(f) < 2 THEN begin erase (f); halt; end; blockread (f,wavfile,sizeof(wavfile),rr); close(f); CLRSCR; with wavfile do begin writeln('Riff ID: ',RiffID); writeln('Riff Length: ',RiffLength); writeln('Wav ID: ',WavID); writeln('Fmt ID: ',FmtID); writeln('Fmt Length: ',FmtLength); writeln('Wav Format Tag: ',WavFormatTag); writeln('Channels: ',Channels); writeln('Samples Per Sec: ',SamplesPerSec); writeln('Bytes Per Sec: ',BytesPerSec); writeln('Block Align: ',BlockAlign); writeln('Fmt Specific: ',FmtSpecific); { writeln('Padding: ',Padding); } writeln('Data ID: ',DataID); writeln('Data Length: ',DataLength); end; delay(60); End.