Which functions are available within Delphi to play a sound-file?
+1
A:
A full tutorial is available at: http://sheepdogguides.com/dt3f.htm
It is a bit old. But it should work.
Gamecat
2008-10-29 13:16:36
Yup it still works in 2009.
Gamecat
2008-10-29 13:24:31
+3
A:
With the function sndPlaySound from the WIN32-API (Unit MMSystem):
sndPlaySound('C:\Windows\Media\Tada.wav', SND_ASYNC);
Name
2008-10-29 13:20:25
+12
A:
Here's the fastest way:
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;
hmemcpy
2008-10-29 13:21:06
+1
A:
This page explains quite good how to use the function sndPlaySound and how to embed the wav-file as a resource: http://www.latiumsoftware.com/en/delphi/00024.php
Name
2008-10-30 14:32:49