Results 1 to 6 of 6

Thread: Sound Card

  1. #1

    Thread Starter
    Frenzied Member SeanK's Avatar
    Join Date
    May 2002
    Location
    Boston MA
    Posts
    1,160

    Sound Card

    Anyone know how to detect whether or not a PC has a sound card installed?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    VB Code:
    1. Private Declare Function waveOutGetNumDevs Lib "winmm" () As Long
    2. Private Declare Function midiOutGetNumDevs Lib "winmm" () As Integer
    3.  
    4. Private Const AUDIO_NONE = 0
    5. Private Const AUDIO_WAVE = 1
    6. Private Const AUDIO_MIDI = 2
    7.  
    8. Private Function HasSoundCard() As Boolean
    9.     Dim i As Integer
    10.     Dim CanPlaySound As Integer
    11.    
    12.     i = AUDIO_NONE
    13.  
    14.     If waveOutGetNumDevs > 0 Then
    15.         i = AUDIO_WAVE
    16.     End If
    17.  
    18.     If midiOutGetNumDevs > 0 Then
    19.         i = i + AUDIO_MIDI
    20.     End If
    21.  
    22.     CanPlaySound = i > 0
    23.     MsgBox HasSoundCard
    24.  
    25. End Function

  3. #3

    Thread Starter
    Frenzied Member SeanK's Avatar
    Join Date
    May 2002
    Location
    Boston MA
    Posts
    1,160
    Thanks Hack. Do you know how I can get some information on the sound card if it is present?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

  5. #5

    Thread Starter
    Frenzied Member SeanK's Avatar
    Join Date
    May 2002
    Location
    Boston MA
    Posts
    1,160
    Hey Hack, that link you gave me timed out. It said "Bad Gateway".

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Son of a gun...you are try.

    Try again later. I know that is a good link. They may be having problems with their Server at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width