Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems to play *.WAV-files with function sndplaysound()...

27 views
Skip to first unread message

axel mueller

unread,
Nov 28, 2000, 3:00:00 AM11/28/00
to
Hello ,
my soundcard is ok and plays WAVE-files for example with Mediajukebox.
In my Delphi-Project i have written a function to test the installation of
the Soundblaster-card :

function SoundCardInstalled:Boolean;
begin
Result:=WaveOutGetNumDevs>0;
end;

How expected it returns true;
But if try to play my WAVE-file with the sndplaysound-function using the
mmsystem-unit it happens nothing ( no sound , no messages ).
i call it with the parameters below:

sndplaysound('C:\MYSOUND.WAV',SND_ASYNC);

why it doesn go (something forgotten ? )
Thanks
axel müller

Jens Gruschel

unread,
Nov 28, 2000, 3:00:00 AM11/28/00
to
Hi Axel,

SndPlaySound wants a PChar, not a String, perhaps that's the reason
(although I thought it should also work). Or the file does not exist.
Following procedure wotks fine for me...

Jens

Procedure PlaySound (SoundFileName: String);
Begin
If SoundFileName <> '' Then SndPlaySound
(PChar(SoundFileName),SND_ASYNC);
End;

Gordon Waters

unread,
Nov 29, 2000, 12:40:36 AM11/29/00
to
I use
playsound(pchar('type.wav'),0,SND_ASYNC);
from the mmsystem unit , and have no problems with it.

Regards

Gordon Waters

axel mueller wrote:

--
------------------------------------

Gordon Waters
Systems Support
The Canberra Times


------------------------------------


0 new messages