我想开始一个 C++ 项目,该项目允许我使用 float y = sin(2 * PI * f * t);、FM 合成和其他更复杂的算法等函数创建声音`。我在 Mac OS X Lion 上使用 Xcode 4,但希望最终将该软件移植到 Windows 平台。我尝试过 SFML 1.6 和 2.0、RTAudio 和 PortAudio 库,但我无法使用 Xcode 4 编译任何程序。窗口图形库和 MIDI 支持将是额外的好处,但我不需要它。
您是否有成功使用过的库和方法?如果前面提到的任何库对您有用,您是如何使用 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);
, 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?
发布评论
评论(2)
我为 Windows 和 Mac 创建了一个名为“Crosstalk”的 C++ 音频库。
它是一个实时 C++ 音频引擎,允许您实时创建和路由音频系统。基本上,该引擎负责所有音频路由,并为您提供一个用于创建系统组件的简单平台(例如,连接到“低通滤波器”的“FM Synth”组件,该“低通滤波器”连接到“音频设备”和“文件录音机”) 。
它非常容易使用。下面是如何播放 mp3 文件的示例(这些组件随引擎提供):
Crosstalk 中包含示例 Xcode 和 Visual Studio 项目。
您可以在此处下载 Crosstalk 并查看 API 文档和许可详细信息: http://www.adaptaudio.com/Crosstalk
编辑(01-12-2012):
Crosstalk 已被名为“DSPatch"。 DSPatch本质上是Crosstalk背后路由引擎的升级版本,不再仅限于音频处理。 DSPatch 允许您创建和路由几乎任何类型的流程链,并且免费供个人和专有使用:)
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):
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 :)
libsndfile 也许可以帮助你
http://www.mega-nerd.com/libsndfile/
libsndfile maybe help you
http://www.mega-nerd.com/libsndfile/