with mediaplayer1 do begin filename:='*.wav'; autoopen:=true; devicetype:=dtwaveaudio; open; play; end;
procedure TForm1.Button1Click(Sender: TObject); begin with mediaplayer1 do begin filename:='f:\mp3\test.wav'; autoopen:=true; devicetype:=dtwaveaudio; open; play; end; end; 这样写可以运行,但是没有反应.我把相应的文件删除后程序没有出错
with mediaplayer1 do begin filename:='*.wav'; Mediaplayer1.Open Mediaplayer1.Play; Mediaplayer1.Record; Mediaplayer1.Back; Mediaplayer1.Previous; Mediaplayer1.Step; Mediaplayer1.Next; Mediaplayer1.Eject;
begin
filename:='*.wav';
autoopen:=true;
devicetype:=dtwaveaudio;
open;
play;
end;
begin
with mediaplayer1 do
begin
filename:='f:\mp3\test.wav';
autoopen:=true;
devicetype:=dtwaveaudio;
open;
play;
end;
end;
这样写可以运行,但是没有反应.我把相应的文件删除后程序没有出错
只要写
mediaplayer1.open;
mediaplayer1.play;
就可以了 那个device 没有用
begin
filename:='*.wav';
Mediaplayer1.Open
Mediaplayer1.Play;
Mediaplayer1.Record;
Mediaplayer1.Back;
Mediaplayer1.Previous;
Mediaplayer1.Step;
Mediaplayer1.Next;
Mediaplayer1.Eject;