什么是最实惠的 C++ 音频库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/994161/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are the best affordable c++ audio libraries?
提问by Roger B
I'm looking for a c++ audio library that can play mp3s and mix audio. I can spend some money on it, but I'm on a somewhat tight budget, so the less the better. It really needs to just run on Windows and Mac OS X although Linux and embedded devices are a big plus. Anyone know of a good library or two?
我正在寻找一个可以播放 mp3 和混合音频的 C++ 音频库。我可以花一些钱,但我的预算有点紧张,所以越少越好。它确实需要在 Windows 和 Mac OS X 上运行,尽管 Linux 和嵌入式设备是一个很大的优势。有人知道一两个好的图书馆吗?
Thanks!
谢谢!
回答by Klaim
From the game development world, you'll find a lot of good libraries. Obviously "mixing" doesn't tell what exactly you want to do but in a lot of games we mix tracks and sound to get some kind of ambiance so I guess it can be useful for you:
在游戏开发领域,您会发现很多优秀的库。显然,“混音”并不能说明你到底想做什么,但在很多游戏中,我们混合音轨和声音以获得某种氛围,所以我想它对你有用:
UPDATE: fmod now have a free indie license.
更新: fmod 现在有一个免费的独立许可证。
- FMODhttp://www.fmod.org/: might be expensive even if they have a "casual" (think "indie") license. However, it's certainly the "standard" in the industry because it's uncontestably very powerful.
- Irrklanghttp://www.ambiera.com/irrklang/: have been used and recommended by several indie game developers. It's cheap, even if you buy the most expensive version.
- Basshttp://www.un4seen.com/: used in several games so good quality, but more exepensive than Irrklang while cheaper than FMOD.
- Clamhttp://clam-project.org/: this is more free and flexible that the previous libraries but also might be too flexible for your need.
- CAudiohttps://github.com/wildicv/cAudio: wrapping OpenAL with a C++ interface and adding higher lever constructs, it might not fit your need, depends, but also I'm not sure of the quality of the library; maybe worth a try as it's the most open-source of all.
- FMOD http://www.fmod.org/:即使他们拥有“休闲”(想想“独立”)许可证,也可能很昂贵。然而,它无疑是行业的“标准”,因为它无可争议地非常强大。
- Irrklang http://www.ambiera.com/irrklang/:已被多家独立游戏开发商使用和推荐。即使您购买最昂贵的版本,它也很便宜。
- Bass http://www.un4seen.com/:用在好几款游戏中,质量很好,但比Irrklang贵,比FMOD便宜。
- Clam http://clam-project.org/:这比以前的库更自由和灵活,但也可能过于灵活,无法满足您的需求。
- CAudio https://github.com/wildicv/cAudio:用 C++ 接口包装 OpenAL 并添加更高级别的构造,它可能不适合您的需要,取决于,但我也不确定库的质量;也许值得一试,因为它是最开源的。
If you are not pressed by time (or want to help), there is also Plaid/Audio, a promising software audio processing library which is still a work in progressbut is extracted from the engine used by SourceSelf(a game which use player's sounds -like, your voice- as input).
如果您没有时间紧迫(或想要帮助),还有Plaid/Audio,这是一个很有前途的软件音频处理库,它仍在进行中,但从 SourceSelf使用的引擎中提取出来(使用玩家声音的游戏)- 就像,你的声音 - 作为输入)。
回答by Andrew
回答by SPWorley
回答by Alex Martelli
Though it does do ten zillion more things that you don't mention, I can't fail to recommend Qt with Phonon-- I learned about it only earlier today (from another Q&A on SO!) and it's opening new frontiers for me. If you need even a tiny fraction of the incredible power of Qt, that's definitely something worth trying (LGPL, so free and unencumbered as long as you don't modify the library itself).
虽然它确实做了十亿多件你没有提到的事情,但我不能不推荐使用 Phonon 的 Qt——我今天早些时候才知道它(从另一个关于 SO 的问答中!),它为我开辟了新的领域。如果您需要 Qt 令人难以置信的强大功能的一小部分,那绝对值得尝试(LGPL,只要您不修改库本身,就可以免费且不受阻碍)。
回答by David Johnstone
回答by Mike Lowen
Have you looked at libavcodec? seems like it would be what you are after. You are able to grab it from the ffmpegsite.
你看过libavcodec吗?似乎这就是你所追求的。您可以从ffmpeg站点获取它。