S
songguolong
Unregistered / Unconfirmed
GUEST, unregistred user!
我在用MCI编制媒体播放器时,用了以下过程来设置媒体文件的位置:
procedure Tcontroler.SetPosition(Value: Longint);
var
SeekParm: TMCI_Seek_Parms;
begin
if MCIOpened then
begin
FFlags := 0;
FFlags := mci_Wait;
if FUseNotify then
begin
if FNotify then
FFlags := FFlags or mci_Notify;
FUseNotify := False;
end;
FFlags := FFlags or mci_To;
SeekParm.dwCallback := Handle;
SeekParm.dwTo := Value;
FError := mciSendCommand( FDeviceID, mci_Seek, FFlags, Longint(@SeekParm));
end;
end;
当value等于长度或0时,结果当前位置如愿,而画面却停留在了前一屏?
procedure Tcontroler.SetPosition(Value: Longint);
var
SeekParm: TMCI_Seek_Parms;
begin
if MCIOpened then
begin
FFlags := 0;
FFlags := mci_Wait;
if FUseNotify then
begin
if FNotify then
FFlags := FFlags or mci_Notify;
FUseNotify := False;
end;
FFlags := FFlags or mci_To;
SeekParm.dwCallback := Handle;
SeekParm.dwTo := Value;
FError := mciSendCommand( FDeviceID, mci_Seek, FFlags, Longint(@SeekParm));
end;
end;
当value等于长度或0时,结果当前位置如愿,而画面却停留在了前一屏?