Beeping help!

This is a discussion on Beeping help! within the C++ Programming forums, part of the General Programming Boards category; how do you make a high beep, then a low beep? My compiler doesn't have <windows.h>, but it does have ...

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Exclamation Beeping help!

    how do you make a high beep, then a low beep?
    My compiler doesn't have <windows.h>, but it does have <dos.h>.

    Thanks, Cool-August.

  2. #2
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269
    Apparently <dos.h> has a sound() function. I'm pretty sure it takes one parameter: an integer for frequency. Then, just wait and when your done with, use nosound(). Just a quick Google though

    - SirCrono6
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

  3. #3
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    i don't feel like looking it up, but i think the sound function (if it exists) takes 2 paramters. one is the frequency like sir crono said, and the other is the duration in microseconds
    i seem to have GCC 3.3.4
    But how do i start it?
    I dont have a menu for it or anything.

  4. #4
    Super Moderater.
    Join Date
    Jan 2005
    Posts
    374
    My compiler doesn't have <windows.h>, but it does have <dos.h>.

    So why not download a new one that does have windows.h? Look it's really simple
    go to this link :


    http://www.bloodshed.net/devcpp.html

    It's only 8MB so has a reasonable download time even if you have a 56k dial up connection. And it's as simple as that.

  5. #5
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    You mean something like this?
    Code:
    sound(1000,4000);
    That would make a low beep for 1 second right?

  6. #6
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    I went to:
    http://www.bloodshed.net/devcpp.html
    if asks for a mirror. What is a mirror?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Want to stop single-line text control beeping at me
    By bennyandthejets in forum C# Programming
    Replies: 3
    Last Post: 03-28-2005, 02:48 PM
  2. Beeping
    By Stan100 in forum Game Programming
    Replies: 1
    Last Post: 01-10-2003, 03:16 PM
  3. beeping with certain MB_ flags
    By bennyandthejets in forum Windows Programming
    Replies: 2
    Last Post: 12-09-2002, 05:51 AM
  4. pc beeping
    By Unregistered in forum C Programming
    Replies: 11
    Last Post: 12-09-2001, 11:15 AM
  5. Beeping speaker in Win console mode
    By Tesseract in forum C Programming
    Replies: 3
    Last Post: 12-08-2001, 08:49 PM

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