Can I Generate sound in c..?

This is a discussion on Can I Generate sound in c..? within the C Programming forums, part of the General Programming Boards category; Hello everybody...! I have little bit idea about c & c++, I want to play an audio file using c ...

  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    4

    Smile Can I Generate sound in c..?

    Hello everybody...!

    I have little bit idea about c & c++,

    I want to play an audio file using c language. so is there any predefined functions in c to play an audio file. am trying to generate sound in file concept with

    sound(integer);

    function but i did'nt find any sound.
    If any one have an Idea about it pls help me...!

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    There is no audio or graphics support in C or it's standard libraries... For that you will need to get busy on google and find your own libraries to do the job.

    If you are on windows, with a set of windows headers at your disposal. You can #include <windows.h> and then use the PlaySound() api call with relative ease, also the Beep() call for making silly noises.

  3. #3
    Third Eye Babkockdood's Avatar
    Join Date
    Apr 2010
    Posts
    352
    It's not possible with the C standard library. You would need an external library to help you. However, the \a escape sequence forces the computer to emit a tone.
    Quote Originally Posted by The Jargon File
    Microsoft Windows - A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition.

  4. #4
    Registered User
    Join Date
    Sep 2010
    Posts
    16
    check this library FMOD - Debian Wiki

  5. #5
    Registered User
    Join Date
    Jan 2011
    Posts
    4
    Thank you.... all of you for giving such advices....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How can I generate simple sound waves in C++?
    By Fernando Aires in forum C++ Programming
    Replies: 2
    Last Post: 11-20-2010, 05:38 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. DirectSound - multiple sounds
    By Magos in forum Game Programming
    Replies: 9
    Last Post: 03-03-2004, 03:33 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