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. How to emit alarm sound on computer without soundcard

How to emit alarm sound on computer without soundcard

Scheduled Pinned Locked Moved C / C++ / MFC
c++sysadminhelptutorialquestion
5 Posts 3 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.
  • G Offline
    G Offline
    GameProfessor
    wrote on last edited by
    #1

    hi all, I want to create a module that play a alarm sound such as "bip" on a server whenever connection down. Many computers, esp servers, don't have sound card. However, they have a mono-speaker inside that make it able to emit simple sound (like the "bip" you hear when you start the computer). I'm looking for a command to play similar sound in visual C++ without the need of a sound card. Can anyone help ?

    S O 2 Replies Last reply
    0
    • G GameProfessor

      hi all, I want to create a module that play a alarm sound such as "bip" on a server whenever connection down. Many computers, esp servers, don't have sound card. However, they have a mono-speaker inside that make it able to emit simple sound (like the "bip" you hear when you start the computer). I'm looking for a command to play similar sound in visual C++ without the need of a sound card. Can anyone help ?

      S Offline
      S Offline
      Saurabh Garg
      wrote on last edited by
      #2

      Beep[^]. -Saurabh

      G 1 Reply Last reply
      0
      • S Saurabh Garg

        Beep[^]. -Saurabh

        G Offline
        G Offline
        GameProfessor
        wrote on last edited by
        #3

        Thanks, it works very well Also, for anyone who could be interested: we could use a simple function to check if sound card exists and then switch between using Beep() or PlaySound() BOOL m_bIsSoundCardExist = (waveOutGetNumDevs() > 0);

        S 1 Reply Last reply
        0
        • G GameProfessor

          Thanks, it works very well Also, for anyone who could be interested: we could use a simple function to check if sound card exists and then switch between using Beep() or PlaySound() BOOL m_bIsSoundCardExist = (waveOutGetNumDevs() > 0);

          S Offline
          S Offline
          Saurabh Garg
          wrote on last edited by
          #4

          You are welcome. Thanks for the tip. -Saurabh

          1 Reply Last reply
          0
          • G GameProfessor

            hi all, I want to create a module that play a alarm sound such as "bip" on a server whenever connection down. Many computers, esp servers, don't have sound card. However, they have a mono-speaker inside that make it able to emit simple sound (like the "bip" you hear when you start the computer). I'm looking for a command to play similar sound in visual C++ without the need of a sound card. Can anyone help ?

            O Offline
            O Offline
            Ozer Karaagac
            wrote on last edited by
            #5

            You may also use MessageBeep((UINT)-1) function. MessageBeep Function on MSDN[^]

            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