Board index » delphi » How to play wave file from app?

How to play wave file from app?

Can anybody tell me how can to play specific wave file from
aplication..
 

Re:How to play wave file from app?


|Can anybody tell me how can to play specific wave file from
|aplication..

SndPlaySound

Heiko

Re:How to play wave file from app?


Hi,

Why don't you use your mediaplayer-component and make it non visible?

Greetings,
Ronald van der Pas

Jean Pierre heeft geschreven in bericht <36bc16f2.8403...@news.tel.hr>...

Quote
>Can anybody tell me how can to play specific wave file from
>aplication..

Re:How to play wave file from app?


Hey

Use:

ShellExecute(0,'Play','YourWave.wav',nil,nil,sw_Hide)

This will play the sound without showing the Mediaplayer

--
Med venlig hilsen

Ole Mortensen, Primeware

http://home1.dknet.dk/prime/
Jean Pierre skrev i meddelelsen <36bc16f2.8403...@news.tel.hr>...

Quote
>Can anybody tell me how can to play specific wave file from
>aplication..

Re:How to play wave file from app?


Jean Pierre escreveu na mensagem <36bc16f2.8403...@news.tel.hr>...

Quote
>Can anybody tell me how can to play specific wave file from
>aplication..

The simplest way  (only in WIN32)

This one stops any sound playing:
    PlaySound(PChar(''),0,SND_PURGE);
To play

PlaySound(PChar('wavefile.wav'),0,SND_FILENAME+SND_ASYNC);

Paulo

Re:How to play wave file from app?


Jean Pierre heeft geschreven in bericht <36bc16f2.8403...@news.tel.hr>...

Quote
>Can anybody tell me how can to play specific wave file from
>aplication..

uses
  MMSystem

    mciSendString('Play E:\AProject\MySound.wav', nil, 0, 0);

or

   sndPlaySound('E:\AProject\MySound.wav', SND_SYNC or SND_NODEFAULT);

Alan Lloyd
alangll...@aol.com

Other Threads