MCIsendstring播放MP3的问题???
那位高手能帮我把如下代码改为循环播放???急! unit gook;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,mmsystem;
type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.dfm} {$R CustomRes.res}
procedure TForm1.FormCreate(Sender: TObject); var res:TResourcestream; filename:String; begin filename:='temp.mp3'; res:=TResourcestream.Create(0,'erosmp3',Pchar('FILE1')); res.SaveToFile(filename); (Pchar('open '+filename+' type mpegvideo alias nn'),nil,0,0); MCIsendstring('play nn',nil,0,0); res.Free ; deletefile(filename); end;