Sound?

This is a discussion on Sound? within the C++ Programming forums, part of the General Programming Boards category; Hey, I've been trying to make a program that shows the frequency and plays it through your PC speaker until ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    49

    Question Sound?

    Hey, I've been trying to make a program that shows the frequency and plays it through your PC speaker until it gets to 200000 (humans can't hear passed that). Anyway.. I saw it during physics and thought it would be a cool program to make. Only I've run into a problem. Instead of the a sound it's more like a dull beeb. I want it so that I can do what the physics program did by playing the sound and test how high frequency you can here. I used dos.h's sound(); but that didn't work. If you could help out please that would be greatly appreciated.
    -Kavity

  2. #2
    31173 h4x0r gnu-ehacks's Avatar
    Join Date
    Nov 2001
    Posts
    556
    You can use the Win32 API function PlaySound(). I'm not sure of the exact syntax, but it couldn't be that difficult to find on the internet.
    What will people say if they hear that I'm a Jesus freak?
    What will people do if they find that it's true?
    I don't really care if they label me a Jesus freak, there is no disguising the truth!

    Jesus Freak, D.C. Talk

    -gnu-ehacks

  3. #3
    31173 h4x0r gnu-ehacks's Avatar
    Join Date
    Nov 2001
    Posts
    556
    Oh, by the way, it will probably be better to create the sound yourself. Just get a sound editor, I'm pretty sure they can do the kind of thing you are asking about.
    What will people say if they hear that I'm a Jesus freak?
    What will people do if they find that it's true?
    I don't really care if they label me a Jesus freak, there is no disguising the truth!

    Jesus Freak, D.C. Talk

    -gnu-ehacks

  4. #4
    Unregistered
    Guest
    can you play .wav or other sound files from a DOS console game coded in c++ ?

  5. #5
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    If I can find the petzold's CD I can show you how to do it...it shows how to create sounds in differnet DB based on a sinewave.

  6. #6
    Unregistered
    Guest

    Cool

    That would be great Ken,

    If you could post the info on that it would be much appreciated.

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, 12:54 PM
  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. Help me modify my Sound Server
    By zdude in forum C Programming
    Replies: 1
    Last Post: 05-14-2003, 06:15 PM
  5. sounds?
    By BODYBUILDNERD in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2002, 03:34 PM

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