Test if a sound card is installed or not programmatically

Spread the love

(* —————————————————-
If you write multimedia software that requires an
installed sound card, of course you must check if
some sound card is installed

You may do so with this function:
—————————————————- *)

function waveOutGetNumDevs: UINT; stdcall; external 'winmm.dll' name

function SoundCardInstalled() : boolean;
     waveOutGetNumDevs function will return a number of
     installed sound cards.
     // *)
     Result := (waveOutGetNumDevs > 0);