Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
Detect whether there is a sound card installed Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
11-Sep-02
Category
Multimedia
Language
Delphi All Versions
Views
105
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

Detect whether there is a sound card installed

Answer:

Solve 1:

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). 

1   // declare by a nicer functionname..
2   
3   function SoundCardInstalled: longint; stdcall;
4     external 'winmm.dll' name 'waveOutGetNumDevs';
5   
6   // use like this..
7   
8   if SoundCardInstalled > 0 then
9     Showmessage('A sound card was found.');



Solve 2:

Add MMSystem in the uses of your form

p
10  rocedure TForm1.Button1Click(Sender: TObject);
11  begin
12    if waveOutGetNumDevs > 0 then
13      ShowMessage('Hay tarjeta de sonido instalada' +
14        #13 +
15        'There is a soundcard installed')
16    else
17      ShowMessage('No Hay tarjeta de sonido instalada' + #13 +
18        #13 +
19        'There is not a soundcard installed');
20  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC