简体   繁体   English

开源声音引擎

[英]Open Source sound engine

When I started using SoundEngine (from CrashLanding and TouchFighter), I had read about a few people recommending not to use it, for it was, according to them, not stable enough. 当我开始使用SoundEngine(来自CrashLanding和TouchFighter)时,我读过一些人建议不要使用它,因为据他们说,它不够稳定。 Still it was the only solution I knew of to play sounds with pitch and position control without learning C++ and OpenAL, so I ignored the warnings and went on with it. 它仍然是我所知道的唯一解决方案,即在不学习C ++和OpenAL的情况下播放音高和位置控制的声音,所以我忽略了警告并继续使用它。

But now I'm starting to worry. 但现在我开始担心了。 The 2.2 SDK introduced AVFoundation. 2.2 SDK引入了AVFoundation。 Using both SoundEngine from CrashLanding (for sounds) and AVAudioPlayer (for music), I found out SoundEngine behaves strangely when the only existing AVAudioPlayer is released (all sounds stop until a new AVAudioPlayer is initiated). 使用来自CrashLanding的SoundEngine(用于声音)和AVAudioPlayer(用于音乐),我发现SoundEngine在释放唯一的现有AVAudioPlayer时表现得很奇怪(所有声音都会停止,直到启动新的AVAudioPlayer)。 Around the same time as the 2.2 SDK came out, the CrashLanding sample code was mysteriously removed from the ADC site. 大约在2.2 SDK发布的同时,CrashLanding示例代码被神秘地从ADC站点中删除。 I'm worried there are more bad surprises to come. 我担心会有更多不幸的事情发生。

My question is, is anyone aware of an Open Source alternative to SoundEngine? 我的问题是,是否有人知道SoundEngine的开源替代品? Maybe even a C++ library that uses OpenAL? 甚至可能是使用OpenAL的C ++库?

看看这个库,但我不知道这是你需要的。

The Kowalski project provides a data driven and portable sound engine that currently runs on iOS, OS X and Windows. Kowalski项目提供了一个数据驱动和便携式声音引擎,目前可在iOS,OS X和Windows上运行。 The engine is released under the zlib license and provides positional audio, pitch control etc. 该引擎在zlib许可下发布,提供定位音频,音高控制等。

ObjectAL for iPhone 适用于iPhone的ObjectAL

Clone it. 克隆它。 Use it. 用它。 Love it. 爱它。 Enjoy the freedom. 享受自由。

I've written a simple sound engine around OpenAL. 我在OpenAL周围写了一个简单的声音引擎 There are no position controls (I didn't need them), but they would be trivial to add if you find the rest to your liking. 没有位置控制(我不需要它们),但是如果你找到其他你想要的东西,它们将是微不足道的。 And there is also some experimental sound code in the Cocos2D engine. 在Cocos2D引擎中还有一些实验性的声音代码 It has both pitch and position controls and looks quite usable. 它有俯仰和位置控制,看起来非常实用。

Why not just use AVFoundation? 为什么不直接使用AVFoundation? It's pretty simple to handle and nicely flexible - apart from if you need exact timing (says the Apple documentation - but I've been testing it fairly extensively and yet to find any significant practical issues) I don't see any reason for not leveraging it. 处理起来非常简单并且非常灵活 - 除了你需要精确的时间(Apple文档说 - 但我已经对它进行了相当广泛的测试,但却找不到任何重大的实际问题)我认为没有任何理由不利用它。

AVFoundation lacks sound placement. AVFoundation缺乏声音放置。 This makes me sad. 这让我很伤心。

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

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