Beeping speaker in Win console mode

This is a discussion on Beeping speaker in Win console mode within the C Programming forums, part of the General Programming Boards category; How do I do it? I thought I saw a "sound()" someplace, but I'm not sure what header it's in ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    2

    Arrow Beeping speaker in Win console mode

    How do I do it? I thought I saw a "sound()" someplace, but I'm not sure what header it's in or how to use it.

    Andrew

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    162
    There is a beep function in stdlib, but I have never used it before, and I don't even know what it does. I would give it a try, though.

  3. #3
    Nosepicker DrakkenKorin's Avatar
    Join Date
    Nov 2001
    Posts
    407
    Code:
    printf("\a");
    Will give you a system beep, I think it ultimately depends on your compiler. Worked for me when I tried it on Dev-C++
    DrakkenKorin

    Get off my Intarweb!!!!

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,705
    There is a Windows fuction called Beep(). Since you are probably not using Windows NT, you can set it's two parameters to zero.

    Thing is, it only gives you the default system beep, no way to pick the sound...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 10-22-2008, 07:20 PM
  2. console mode and service mode
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 06-01-2008, 01:42 AM
  3. How to make console Mode apps like 'GNU less'?
    By gibsosmat in forum C Programming
    Replies: 4
    Last Post: 10-31-2007, 07:33 AM
  4. help with this
    By tyrantil in forum C Programming
    Replies: 18
    Last Post: 01-30-2005, 03:53 PM
  5. Console Functions Help
    By Artist_of_dream in forum C++ Programming
    Replies: 9
    Last Post: 12-04-2004, 02:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21