c++ sound

This is a discussion on c++ sound within the C++ Programming forums, part of the General Programming Boards category; I'm Just a beginner to c++, I have borland compiler version 3 and i just wanted to add some simple ...

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

    c++ sound

    I'm Just a beginner to c++, I have borland compiler version 3
    and i just wanted to add some simple sounds to a console program. I saw a post that had something like.....

    #include <dos.h>

    main()
    {
    sound(7);
    delay(100);
    nosound();
    return0();
    }

    I tried this but the compiler says
    :call to undefined function sound

    can you help????

  2. #2
    Registered User cody's Avatar
    Join Date
    Sep 2001
    Posts
    86
    Hi,

    it didn't compile because the sound() function you saw in the other thread appearently was written by that programmer himself. So, if you want to have sounds in your own program you'll have to write these functions yourself or get them from somewhere else (maybe a free lib or any other source)...Maybe take a look at that thread again and send the poster a private message. He might give you a glance at his code ...

    aloa
    cody
    #include "reallife.h"

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    reply

    I believe that \a in a string would produce a system *beep*.

    printf("\a");
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    2
    Thanks guys for your help. But is there certain header file you can use for sound tones or something simple like that?

  5. #5
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    dos.h, function sound () nosound ()... etc.
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sound lags in multi-thread version
    By VirtualAce in forum Game Programming
    Replies: 23
    Last Post: 08-27-2008, 11:54 AM
  2. Low latency sound effects
    By VirtualAce in forum Game Programming
    Replies: 0
    Last Post: 12-21-2004, 12:58 AM
  3. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  4. Help me modify my Sound Server
    By zdude in forum C Programming
    Replies: 1
    Last Post: 05-14-2003, 05:15 PM
  5. sounds?
    By BODYBUILDNERD in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2002, 02:34 PM

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