Question

I am wanting to begin a project in C++ which would allow me to create sounds with functions such as float y = sin(2 * PI * f * t);, FM synthesis, and other more complex algorithms`. I am using Xcode 4 on Mac OS X Lion but would like to eventually port the software to Windows platforms. I have tried the libraries SFML 1.6 and 2.0, RTAudio, and PortAudio, but I have failed to compile any of the programs with Xcode 4. A window graphics library and MIDI support would be bonuses, but I do not require it.

Are there any libraries and methods you have been successful with? If any of the previously mentioned libraries have worked for you, how have you made it compile with Xcode 4?

Was it helpful?

Solution

libsndfile maybe help you

http://www.mega-nerd.com/libsndfile/

OTHER TIPS

I've created a C++ audio library for Windows and Mac named "Crosstalk".

It's a real-time C++ audio engine that allows you to create and route audio systems in real-time. Basically, the engine takes care of all the audio routing and gives you a simple platform for creating system components (E.g. "FM Synth" component connected to a "Low-Pass Filter" connected to an "Audio Device" and "File Recorder").

It's very easy to use. Here's an example of how to play an mp3 file (These components are provided with the engine):

XtSystem system;
XtMp3Decoder mp3Decoder;
XtAudioDevice audioDevice;

long md = system.addComponent(&mp3Decoder);
long ad = system.addComponent(&audioDevice);

system.connOutToIn(md,0,ad,0);
system.connOutToIn(md,1,ad,1);

mp3Decoder.loadFile("../05 Tchaikovski-Swan Lake-Scene.mp3");
mp3Decoder.play();

Included with Crosstalk is example Xcode and Visual Studio projects.

You can download Crosstalk and check out the API documentation and licensing details here: http://www.adaptaudio.com/Crosstalk

EDIT (01-12-2012):

Crosstalk has been replaced by an open-source project called "DSPatch". DSPatch is essentially an upgraded version of the routing engine behind Crosstalk that is no longer limited to only audio processing. DSPatch allows you to create and route almost any type of process chain imaginable, and free for personal AND proprietary use :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top