Board index » delphi » Playing wave-files

Playing wave-files

How do I check the system how to play wave-files or not.
I have a application I want to distribute to friends, but not all of my
friends
have a soundcard.

The wave plays when the appcication starts.
I don't want to use ini-files or a question.

Thanks

AAsmund

 

Re:Playing wave-files


In article <01bbd3ea$7254f900$26704...@ppp.eunet.no>, a...@nord.eunet.no
says...

Quote
>How do I check the system how to play wave-files or not.
>I have a application I want to distribute to friends, but not all of my
>friends have a soundcard.

I'm guessing, but I think you basically want to check to see if .wav
playback capability exists.

This is from Paul Warren in Delphi Magazine, July 1996 (p.61):

"The function waveOutGetNumDevs: Word; returns the number of wave output
devices installed. A simple but fairly safe way to check if you can play a
.WAV file is to see if waveOutGetNumDevs returns a non-zero result. If it
does, you can play the file."

Hope this helps,

Mark

Re:Playing wave-files


In article <01bbd3ea$7254f900$26704...@ppp.eunet.no>, a...@nord.eunet.no
says...

Quote
>How do I check the system how to play wave-files or not.
>I have a application I want to distribute to friends, but not all of my
>friends have a soundcard.

Call waveOutGetNumDevs. This returns a word containing the number of wave
output devices installed. A zero value indicates that there are no .wav
output devices available.

Mark

Other Threads