简体   繁体   English

跨平台(C / C ++)音频库,用于MP3,AAC,WAV

[英]Cross Platform (C/C++) Audio Library for MP3, AAC, WAV

I'm trying to find a cross platform audio library that will have the following abilities (in order of importance): 我正在尝试找到一个跨平台音频库,该库具有以下功能(按重要性顺序):

  • Full Windows, Mac, Linux support 完整的Windows,Mac,Linux支持
  • C / C++ APIs C / C ++ API
  • Free/cheap but commercially viable 免费/便宜但在商业上可行
  • MP3 Support MP3支持
  • AAC Support AAC支持
  • WMA Support WMA支持
  • FLAC Support FLAC支持
  • OGG Support OGG支持
  • ARM Linux support would be nice ARM Linux支持会很好
  • Open Source 开源的

I've found several things like OpenAL, libao, Bass, etc. but they all seem to all either have a limitation of OS, codec or both. 我发现了一些东西,例如OpenAL,libao,Bass等,但是它们似乎都具有操作系统,编解码器的限制,或者两者都有。 For the most part MP3 and AAC support are a must as I'm working on a media player and would like it to support those common formats. 在大多数情况下,必须支持MP3和AAC,因为我正在开发媒体播放器,并希望它支持那些通用格式。

Any suggestions? 有什么建议么?

You can take a look at GStreamer and FFmpeg . 您可以看一下GStreamerFFmpeg

EDIT : 编辑

Since you are willing to use Qt, you should definitely check Qt MultimediaKit , which is a part of the Qt Mobility project. 由于您愿意使用Qt,因此一定要检查Qt MultimediaKit ,它是Qt Mobility项目的一部分。 Phonon is fading away because Qt is investing on MultimediaKit to replace it. 由于Qt正在投资MultimediaKit来替代它,因此Phonon正在逐渐消失。

This example shows how to do simple audio playback. 本示例说明如何进行简单的音频播放。 This example shows how to create a multimedia player. 本示例说明如何创建多媒体播放器。 This example shows a more advanced music player, using Qt and QML. 此示例显示了使用Qt和QML的更高级的音乐播放器。

Try out JUCE . 尝试JUCE It is like Qt in some respects, but much more audio-centric.I've been using it for some years now and it is well maintained and written. 它在某些方面就像Qt,但更多以音频为中心。我已经使用了几年了,并且得到了很好的维护和编写。

I don't know if you are planning on using a framework like Qt. 我不知道您是否打算使用Qt之类的框架。 This has a library called "Phonon" bundled, which is also really nice. 它捆绑了一个名为“ Phonon”的库,这也非常好。 It is built on the corresponding native media framework, so QuickTime on Mac, Windows Media Player on Windows and GTK+ on Linux. 它建立在相应的本地媒体框架上,因此在Mac上是QuickTime,在Windows上是Windows Media Player,在Linux上是GTK +。

PulseAudio also looks promising without any framework. 没有任何框架,PulseAudio看起来也很有前途。

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

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