Thread: Play sound in TurboC++

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    9

    Play sound in TurboC++

    Hello
    can any body say the code needed to play sound
    Iam Using Turbo C++ 3.0 and Windows XP
    I could not find a better match in this forum(as i have searched the forum)
    please can any body say the code

    even the Beep() function is not working (may be i don't internal speakers)

    and I don't have windows.h to include to be able to use PlaySound()

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    char doBeep = '\a';

    std::cout << doBeep;
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    As opposed to the better idea of getting a more up to date compiler suited to your OS, and using one of several win32 APIs available.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    Like salem said, you need the platform SDK to use windows.h header. Turbo C++ is pretty acient. Three good "free" IDE/compilers are DevC++ - free from bloodshed's website

    code::blocks IDE and Microsoft Visual 2005 Express edition - although if you go with express you need to speratley download the SDK from the website, links can be found in the help files
    Double Helix STL

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX Question
    By bladerunner627 in forum Game Programming
    Replies: 2
    Last Post: 04-04-2005, 11:55 AM
  2. Low latency sound effects
    By VirtualAce in forum Game Programming
    Replies: 0
    Last Post: 12-21-2004, 01:58 AM
  3. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  4. Gui Class With Tic Tac Toe
    By xxYukoxx in forum C++ Programming
    Replies: 1
    Last Post: 06-01-2003, 04:28 PM
  5. sounds?
    By BODYBUILDNERD in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2002, 03:34 PM