Board index » delphi » Help! - detecting sound card

Help! - detecting sound card

Hello!

I (still) need to find a way to detect a sound card in a PC. I'm using
D1, but it would be nice, if the method worked under Win 95/NT. I have
tried to use waveGetOutNumDevs, but I can't seem to make it work.

I tried:
if waveGetOutNumDevs=0 then soound:=false;

but delphi stops at waveGetOutNumDevs and tell me that it is an invalid
identifier. What is wrong? I really need to know.

Thanks in advance.

 

Re:Help! - detecting sound card


In article <345EDD6C.5...@hotmail.com>, S?ren Skov Andersen

Quote
<ssk...@hotmail.com> writes:
>but delphi stops at waveGetOutNumDevs and tell me that it is an invalid
>identifier. What is wrong? I really need to know.

Include mmSystem in the uses clause in your program.

waveGetOutNumDevs is the Delphi equivalent of a Windows API function (the
WinAPI function is referenced as a 'C' function in MMSystem.HLP). In
DELPHI_1/DOCS directoryare a number of *.INT files which declare the Delphi
equivalent of these (and many other) API functions. In the same way that
your own written functions and procedures are declared at the top of your
program, these API equivalent functions must be declared somewhere for
Delphi to recognise them. Putting MMSystem in the uses clause points the
compiler to the file (MMSYSTEM.INT) which declares the function.

If you are using some external (in the sense that youi have not defined
it) function/procedure/variable which the compiler {*word*88}s on, the first
question to ask is 'Have I referenced the function/procedure/variable
declaration in the uses clause'.

A trawl through the files in DELPHI_1/DOCS is quite illuminating (but make
sure you don't change them).

Hope this helps

Alan Lloyd
alangll...@aol.com

Re:Help! - detecting sound card


S?ren Skov Andersen <ssk...@hotmail.com> wrote in article
<345EDD6C.5...@hotmail.com>...

Quote
> I (still) need to find a way to detect a sound card in a PC. I'm using
> D1, but it would be nice, if the method worked under Win 95/NT. I have
> tried to use waveGetOutNumDevs, but I can't seem to make it work.
> I tried:
> if waveGetOutNumDevs=0 then soound:=false;
> but delphi stops at waveGetOutNumDevs and tell me that it is an invalid
> identifier. What is wrong? I really need to know.

_________________________________________

Instead of >> if waveGetOutNumDevs=0 <<
you could try >> if WaveOutGetNumDevs = 0 <<

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

Other Threads