Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Detecting Sound Card

Detecting Sound Card

Scheduled Pinned Locked Moved C / C++ / MFC
c++beta-testingtutorialquestioncode-review
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mark Donkers
    wrote on last edited by
    #1

    Good morning/afternoon/night to everyone... Whereever you are. I'm developing an MFC app that will give the user audible feedback. The software needs to know whether to use the sound card (for .wav files) or use the PC speaker. The target platforms will be Win98/2000/NT/ME. Does anyone know how to reliably detect the presence of a sound card? Thanks. Mark Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope -- Daniel Burnham

    M 1 Reply Last reply
    0
    • M Mark Donkers

      Good morning/afternoon/night to everyone... Whereever you are. I'm developing an MFC app that will give the user audible feedback. The software needs to know whether to use the sound card (for .wav files) or use the PC speaker. The target platforms will be Win98/2000/NT/ME. Does anyone know how to reliably detect the presence of a sound card? Thanks. Mark Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope -- Daniel Burnham

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #2

      What functions were you intended to use to play the wav, Windows Multimedia or DirectX? I think PlaySound returns FALSE if it can't play the wav file, you could then play a BEEP if it failed. Michael :-)

      M H 2 Replies Last reply
      0
      • M Michael P Butler

        What functions were you intended to use to play the wav, Windows Multimedia or DirectX? I think PlaySound returns FALSE if it can't play the wav file, you could then play a BEEP if it failed. Michael :-)

        M Offline
        M Offline
        Mark Donkers
        wrote on last edited by
        #3

        I hadn't looked too deep into what function I would use. This "sounds" (ha ha) like a nice simple solution. Thanks. If any knows of any other methods, please let me know. Regards, Mark Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope -- Daniel Burnham

        E 1 Reply Last reply
        0
        • M Mark Donkers

          I hadn't looked too deep into what function I would use. This "sounds" (ha ha) like a nice simple solution. Thanks. If any knows of any other methods, please let me know. Regards, Mark Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope -- Daniel Burnham

          E Offline
          E Offline
          Ernest Laurentin
          wrote on last edited by
          #4

          You could use **UINT waveOutGetNumDevs()** to know if any wave device is installed and then call the appropriate function or use Michael P. Butler method.

          M 1 Reply Last reply
          0
          • E Ernest Laurentin

            You could use **UINT waveOutGetNumDevs()** to know if any wave device is installed and then call the appropriate function or use Michael P. Butler method.

            M Offline
            M Offline
            Mark Donkers
            wrote on last edited by
            #5

            I think this was more of what I was looking for. Thanks to all! Mark :-D Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope -- Daniel Burnham

            1 Reply Last reply
            0
            • M Michael P Butler

              What functions were you intended to use to play the wav, Windows Multimedia or DirectX? I think PlaySound returns FALSE if it can't play the wav file, you could then play a BEEP if it failed. Michael :-)

              H Offline
              H Offline
              Halid Niyaz
              wrote on last edited by
              #6

              hi i think you have sound to clear my problem. i.e i want to disable my sound card. how do i do that? do u have any idea, reply me Thanks in advance regards Halid:confused:

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups