How can I generate simple sound waves in C++?

This is a discussion on How can I generate simple sound waves in C++? within the C++ Programming forums, part of the General Programming Boards category; Hi. I'd like to generate simple sounds, I really mean just "beeps", in C or C++, just like those sounds ...

  1. #1
    Registered User Fernando Aires's Avatar
    Join Date
    Nov 2010
    Location
    Brazil - Florianópolis, SC
    Posts
    6

    Question How can I generate simple sound waves in C++?

    Hi.

    I'd like to generate simple sounds, I really mean just "beeps", in C or C++, just like those sounds generated by vintage computers such as the Atari 800. I'd like to use a simple sound library. I've heard about FMOD but it's so complicated and I never understood how to use it.

    Can you tell me what's the simplest sound library for generating those simple "beeps"?

    Thank you in advance.

  2. #2
    Registered User
    Join Date
    Oct 2010
    Posts
    18
    My reply goes far beyond simple sounds, but you can create simple sounds with a very flexible and wide open potential to go further if you want.

    I do a lot of audio programming, which for the most part means writing software synthesizers. My personal choice, for relative ease of use I'd say FMOD. You can get an easy start by looking at their usercreatedaudio example that comes with their API.

    fmod - interactive audio middleware

    Once you install the API, browse to the installation path and you'll find yourself with tons of useful documentation and examples to get you started.

    FMOD unfortunately doesn't let you sell software without a license fee, but you can freely distribute what you create without having to worry about licensing.

    It's a good place to learn. OpenAL can be more ... frustrating, until you really get the hang of things at least. FMOD supports MP3 and other common formats, so it can be very convenient if you want to do some stuff with little hassle. (This API is used by a lot of major game developers as well.)

    FMOD also has a good forum for audio programming, the API developers frequently answer questions that users bring up.

    OpenAL is the freebie but ... rougher API. You'll need to do more work connecting things to get what you want.

    There's alternatives to those but I'll just let others here drop those reply's.
    Last edited by syneii; 11-17-2010 at 04:08 PM.

  3. #3
    Registered User Fernando Aires's Avatar
    Join Date
    Nov 2010
    Location
    Brazil - Florianópolis, SC
    Posts
    6
    Thanks, I've downloaded the full version of FMOD and now I'm trying to learn how to do what I want with it

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sound and graphics in C - recommandation needed
    By gavra in forum C Programming
    Replies: 50
    Last Post: 06-05-2008, 07:41 AM
  2. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM
  3. Simple simple graphics
    By triplem in forum C Programming
    Replies: 2
    Last Post: 05-19-2003, 02:52 AM
  4. sounds?
    By BODYBUILDNERD in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2002, 02:34 PM
  5. Sound card interrupt problems
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-05-2001, 03:38 AM

Tags for this Thread


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