哪个实时 C++音频库可以与 Xcode 4 一起使用吗?

发布于 2024-12-15 05:09:22 字数 292 浏览 0 评论 0 原文

我想开始一个 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

荆棘i 2024-12-22 05:09:22

我为 Windows 和 Mac 创建了一个名为“Crosstalk”的 C++ 音频库。

它是一个实时 C++ 音频引擎,允许您实时创建和路由音频系统。基本上,该引擎负责所有音频路由,并为您提供一个用于创建系统组件的简单平台(例如,连接到“低通滤波器”的“FM Synth”组件,该“低通滤波器”连接到“音频设备”和“文件录音机”) 。

它非常容易使用。下面是如何播放 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();

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):

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 :)

哭泣的笑容 2024-12-22 05:09:22

libsndfile 也许可以帮助你

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

libsndfile maybe help you

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文