If you need to detect whether there is a sound card installed, your application may call the function 'waveOutGetNumDevs' from the multimedia DLL (winmm.dll, part of a standard installation).
// declare by a nicer functionname..
function SoundCardInstalled : longint; stdcall;
external 'winmm.dll' name 'waveOutGetNumDevs';
// use like this..
if SoundCardInstalled > 0 then
Showmessage('A sound card was found.');