X
xaviter
Unregistered / Unconfirmed
GUEST, unregistred user!
我想取得RM文件的播放时间,但不知为什么,GETLENGTH函数取得总为0?
procedure TForm1.Button2Click(Sender: TObject);
var TheLength: LongInt;
begin
edit1.Text :='';
Edit2.Text:='';
if not Opendialog1.Execute then Exit;
with RealAudio1 do
begin
RealAudio1.Source := OpenDialog1.FileName;
doplay;
Thelength :=GETLength;//这句总为0,不知为什么?
end;
with HMSRec(TheLength) do
begin
edit1.Text := '文件时间长度:'+IntToStr(thelength div 60000 div 60)+':'+IntToStr(thelength div 60000 mod 60)+':'+IntToStr(thelength div 1000 mod 60);
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var TheLength: LongInt;
begin
edit1.Text :='';
Edit2.Text:='';
if not Opendialog1.Execute then Exit;
with RealAudio1 do
begin
RealAudio1.Source := OpenDialog1.FileName;
doplay;
Thelength :=GETLength;//这句总为0,不知为什么?
end;
with HMSRec(TheLength) do
begin
edit1.Text := '文件时间长度:'+IntToStr(thelength div 60000 div 60)+':'+IntToStr(thelength div 60000 mod 60)+':'+IntToStr(thelength div 1000 mod 60);
end;
end;