Beep at different tones

This is a discussion on Beep at different tones within the Game Programming forums, part of the General Programming Boards category; I want the computer to beep at 2/3 different tones for my pong game (when hitting the padde, when hitting ...

  1. #1
    Registered User moonwalker's Avatar
    Join Date
    Jul 2002
    Posts
    282

    Beep at different tones

    I want the computer to beep at 2/3 different tones for my pong game (when hitting the padde, when hitting the wall, when it falls down)

    how do i do this ? what's the simplest way ?

  2. #2
    Intranasal Heroin User Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,035
    in Turbo C++, if your making it for DOS, include stdlib.h, conio.h, and stdio.h, and use the function sound().

    Code:
    sound(100); //low
    sound(500); //medium
    sound(1000); //ear-pearceing scream

  3. #3
    Registered User moonwalker's Avatar
    Join Date
    Jul 2002
    Posts
    282

    BC++

    what about bc++ 5.5 ?
    i need to compile this game only with that..

    also, how do i contrl the length of the tone?

  4. #4
    Intranasal Heroin User Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,035
    oh yeah im sorry
    Code:
    sound(100);
    delay(500);//half a second
    nosound();

  5. #5
    Registered User moonwalker's Avatar
    Join Date
    Jul 2002
    Posts
    282

    hmm

    How do i do this in borland c++ 5.5 ?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. linux beep function
    By Calef13 in forum C++ Programming
    Replies: 7
    Last Post: 07-14-2007, 02:39 AM
  2. I need to play a pre recorded vox file using C
    By m.sudhakar in forum C Programming
    Replies: 4
    Last Post: 11-17-2006, 06:59 PM
  3. alert beep sound
    By bazzano in forum C Programming
    Replies: 3
    Last Post: 02-14-2006, 02:24 PM
  4. Beep();
    By SirCrono6 in forum C++ Programming
    Replies: 7
    Last Post: 02-22-2004, 04:47 PM
  5. Beep And Win98
    By Stan100 in forum Windows Programming
    Replies: 3
    Last Post: 01-14-2003, 02:53 PM

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