sound please

This is a discussion on sound please within the Windows Programming forums, part of the Platform Specific Boards category; I am writing a windows form program and I want to add some sound to it like when you click ...

  1. #1
    UnknownAmateur Programmer
    Join Date
    Sep 2008
    Location
    Were definitly not in Kasas anymore...
    Posts
    25

    sound please

    I am writing a windows form program and I want to add some sound to it like when you click something or a timer click accurs. What command should I use to create the sound?
    I program using Visual Studio Professional 2008. I have little experience, I'm self taught. I started basic C in early March 2008 with a 1987 compiler and C++ this October with Visual Studio. I normally program in Visual C++ creating form programs. My current project is a simple game where I hide a dot and you have to find it in different random sinerios.

    My Catchphrase:
    DOS wasn't written in a day...

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    PlaySound, perhaps?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    sndPlaySound()
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  4. #4
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,605
    Look into the waveOutXxx functions. They actually very easy to use once you figure them out.
    PM if you want a working example, as I don't have the file on this computer.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  5. #5
    UnknownAmateur Programmer
    Join Date
    Sep 2008
    Location
    Were definitly not in Kasas anymore...
    Posts
    25
    I forget to tell you. Im programing in c++ and I want to use a wave sound. I havnt had time to try anything but Thanks for the help.
    I program using Visual Studio Professional 2008. I have little experience, I'm self taught. I started basic C in early March 2008 with a 1987 compiler and C++ this October with Visual Studio. I normally program in Visual C++ creating form programs. My current project is a simple game where I hide a dot and you have to find it in different random sinerios.

    My Catchphrase:
    DOS wasn't written in a day...

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I'm quite convinced that PlaySound is the easiest to use, and will do .WAV files.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

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