这是最快的方式:
uses MMSystem; procedure TForm1.Button1Click(Sender: TObject); begin sndPlaySound('C:\Windows\Media\Tada.wav',SND_NODEFAULT Or SND_ASYNC Or SND_LOOP); end; procedure TForm1.Button2Click(Sender: TObject); begin sndPlaySound(nil,0); // Stops the sound end;