CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2004
    Posts
    23

    Weird problem with Sound card detecting

    Hi

    I got a problem with detecting sound card with Windows xp

    I use SDK function waveInGetNumDevs() to test if there is a sound card. But even if there is no sound card installed, the function still returns 1. And even waveInGetDevCaps() returns no error. I checked device->hardware, and there are some items under "Audio, Vido and game" catogary, they includes :
    "Legacy audio driver",
    "Audio codecs"
    "Media Control devices"
    Guess there are some onboard Audio support, but no sound card installed.

    SO how can I detect if there is a sound card installed or not? Can anyone help me?
    Thanks

    Deng

  2. #2
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125
    You would have to iterate throught the installed devices to see if one meets your qualifications.

    Really curious why you would care if it was a physical card as opposed to integrated support on the motherboard....
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  3. #3
    Join Date
    May 2004
    Posts
    23
    How to do the iterate? can you explain in more detail?

    There is really no or not full sound support on motherboard.

    I am trying to record waveform file by using mic. But when I tested it, it is strange that-- if no sound card is installed, it doen't show any fail information, But it will fail when I begin to record. So if something wrong with recording, I can't tell it is due to microphone or due to sound card

  4. #4
    Join Date
    Mar 2004
    Posts
    43
    try the mixerOpen() or mixerGetNumDevs(),goog luck

  5. #5
    Join Date
    May 2004
    Posts
    23
    Originally posted by lugangxyz
    try the mixerOpen() or mixerGetNumDevs(),goog luck
    BIG THANKS!!!!
    It works

  6. #6
    Join Date
    May 2004
    Posts
    23
    Now comes another question:

    Is mixerGetNumDevs() necessarily to judge if sound card or onboard sound support is installed. How it compares to waveInGetDevs()

    Or is it depending on different systems? Coz in anothere system without sound card waveInGetDevs() returns 0

  7. #7
    Join Date
    Mar 2004
    Posts
    43
    sorry,i have not done that before

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

Featured