Board index » delphi » Detecting a Sound Card

Detecting a Sound Card

In article <01bce044$b34d0b20$5584d9cf@mickey>, jsqu...@earthlink.net
says...

Quote
>Is there an accurate way of detecting the existance of a sound card in a
>Windows 95/NT system before attempting to play a WAV media clip
>(tmediaplayer)?

Sure can. The function waveOutGetNumDevs returns a Word with the number of
wave output devices installed. Non-zero results should be a safe bet.

Mark

 

Re:Detecting a Sound Card


JoAnn Quinn <jsqu...@earthlink.net> wrote in article
<01bce044$b34d0b20$5584d9cf@mickey>...

Quote
> Is there an accurate way of detecting the existance of a sound card in a
> Windows 95/NT system before attempting to play a WAV media clip
> (tmediaplayer)?

_________________________________________

Yes. Where NumCards is a Word ...

    NumCards := WaveOutGetNumDevs;

Regards ...
_________________________________________

  ?  Leigh Harrison      
  ?  tel +64 6 343 2671
  ?  fax +64 6 343 2649
  ?  mobile 025 933 913
  ?  email le...@radiOshop.co.nz
  ?  3 Iris Place Wanganui New Zealand
_________________________________________
                             radiOshop

Re:Detecting a Sound Card


Don't ask about details, but the most common way is to query the multimedia
for the presence of wave-audio equipment and use that.

A good place to look would be the calls for MMSYTEM.DLL.

Other Threads