Thread: Using PC Speaker and NOT the sound card in a console...

  1. #16
    Registered User
    Join Date
    Sep 2002
    Posts
    417
    I found the problem with Beep() was I have no PC speaker... which is very weird.

    Don't buy compaqs if you like PC speakers.

    Beep() DOES work fine on XP... tried it on another machine.

  2. #17
    Registered User
    Join Date
    Feb 2002
    Posts
    98
    MS Visual studio 6

  3. #18
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    You can't get around it, that's the nature of windows, there's no library. If you want to get it to work, get linux.
    You don't neccessarily have to go to the point of using Linux. You could just use a virtual machine like Bochs. It's free and can allow you to run pure DOS on WinXP. It's just a pain to get working.

    http://http://bochs.sourceforge.net/

  4. #19
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    i cant believe all of you! you dont even know how to make the pc speaker beep!

    there is a simple header file called dos.h, it has a function in it called sound() and nosound().

    it sends data to the pc speaker.

    the syntax is:

    sound ( Hz )
    nosound ( )
    delay ( milliseconds )

    Example:

    #include <dos.h>

    int main ( void )
    {
    sound ( 100 ); //100 Hz sound
    delay ( 5000 ); //play the sound for 5 seconds
    nosound ( ); //stops sound
    return 0;
    }
    My Website

    "Circular logic is good because it is."

  5. #20
    Registered User
    Join Date
    Sep 2002
    Posts
    417
    Originally posted by DavidP
    i cant believe all of you! you dont even know how to make the pc speaker beep!

    there is a simple header file called dos.h, it has a function in it called sound() and nosound().



    I know this is an old post, but I just got access to this site at home again... my firewall was blocking it and I just figured it out. I want to point out that MVC++ does NOT have those functions, you have to use beep().

Popular pages Recent additions subscribe to a feed