简体   繁体   English

哪些实时C ++音频库可用于Xcode 4?

[英]Which real-time C++ audio libraries work with Xcode 4?

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); 我想开始一个用C ++开发的项目,该项目可以让我创建带有float y = sin(2 * PI * f * t);函数的声音float y = sin(2 * PI * f * t); , FM synthesis, and other more complex algorithms`. ,FM合成以及其他更复杂的算法。 I am using Xcode 4 on Mac OS X Lion but would like to eventually port the software to Windows platforms. 我在Mac OS X Lion上使用Xcode 4,但最终希望将该软件移植到Windows平台。 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. 我已经尝试了SFML 1.6和2.0库,RTAudio和PortAudio库,但是我无法使用Xcode 4编译任何程序。窗口图形库和MIDI支持将是一件好事,但我不需要它。

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? 如果前面提到的任何库对您有用,那么您如何使其与Xcode 4一起编译?

I've created a C++ audio library for Windows and Mac named "Crosstalk". 我已经为Windows和Mac创建了一个名为“ Crosstalk”的C ++音频库。

It's a real-time C++ audio engine that allows you to create and route audio systems in real-time. 这是一个实时C ++音频引擎,可让您实时创建和路由音频系统。 Basically, the engine takes care of all the audio routing and gives you a simple platform for creating system components (Eg "FM Synth" component connected to a "Low-Pass Filter" connected to an "Audio Device" and "File Recorder"). 基本上,引擎负责所有音频路由,并为您提供了一个简单的平台来创建系统组件(例如,连接到“低通滤波器”的“ FM Synth”组件连接到“音频设备”和“文件记录器”) 。

It's very easy to use. 它很容易使用。 Here's an example of how to play an mp3 file (These components are provided with the engine): 这是有关如何播放mp3文件的示例(这些组件随引擎一起提供):

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. Crosstalk附带的示例Xcode和Visual Studio项目。

You can download Crosstalk and check out the API documentation and licensing details here: http://www.adaptaudio.com/Crosstalk 您可以在以下位置下载Crosstalk并查看API文档和许可详细信息: http : //www.adaptaudio.com/Crosstalk

EDIT (01-12-2012): 编辑(01-12-2012):

Crosstalk has been replaced by an open-source project called " DSPatch ". 串扰已被名为“ DSPatch ”的开源项目取代。 DSPatch is essentially an upgraded version of the routing engine behind Crosstalk that is no longer limited to only audio processing. DSPatch本质上是Crosstalk背后的路由引擎的升级版本,不再仅限于音频处理。 DSPatch allows you to create and route almost any type of process chain imaginable, and free for personal AND proprietary use :) DSPatch允许您创建和路由几乎可以想象的任何类型的过程链,并且免费供个人和专有使用:)

libsndfile maybe help you libsndfile也许可以帮助您

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM