c ++ mp3库 [英] c++ mp3 library
问题描述
ffmpeg和sdl(sdl_sound,sdl_mixer)不进行编译。我不能得到mpg123的工作 - 是仅为linux世界或什么?有没有关于在Windows上使用mpg123的教程? mpg123无法找到一些符号,我没有把一些dll在正确的路径 - 但是哪些?
总的来说,我想要能够读取和写入所有主要的音频Windows和Mac上的文件格式 - 从Windows开始。
有几个选项:
GStreamer 是一个用于构建媒体处理组件图形的跨平台库。它支持的应用范围从简单的Ogg / Vorbis播放,音频/视频流到复杂的音频(混合)和视频(非线性编辑)处理。
此页在GStreamer和MP3格式上有一些非常有趣的信息,如果您决定使用GStreamer,则必须阅读:
除此之外,Gstreamer的一个命令行界面通过 gst-launch 这是非常有用的测试您在程序中组装的管道,然后再开始编写代码:
gst -launch filesrc location = / path / to / audiofile! decodebin! oss4sink
如果您需要在Windows上构建GStreamer ,请查看此 Visual Studio教程。
PortAudio 是一个免费的跨平台的开源音频I / O库。它可以使用'C'或C ++编写简单的音频程序,可以在许多平台上编译和运行,包括Windows,Macintosh OS X和Unix(OSS / ALSA)。
I am exhausted searching for a c++ mp3 decoding library, preferably free (like lgpl) and cross-platform or for windows and mac. Can anyone suggest such library and post some tutorial for using it? ffmpeg and sdl (sdl_sound, sdl_mixer) aren't compiling. I am unable to get mpg123 working - is it for linux world only or what? Is there some tutorial on using mpg123 on windows? mpg123 is unable to find some symbols that is I am not putting some dll's at right path - but which?
Overall, I want be able to read and write all major audio file formats on windows and mac - starting with windows.
There are a couple of options:
GStreamer is a cross-platform library for constructing graphs of media-handling components. The applications it supports range from simple Ogg/Vorbis playback, audio/video streaming to complex audio (mixing) and video (non-linear editing) processing.
This page has some very interesting info on GStreamer and the MP3 format, it's a must-read if you decide to go with GStreamer:
The MP3 audio format is a pain. It is patent-encumbered, making it hard for Linux distributors to package (or Linux users to use) legally in various parts of the world. It doesn't even sound all that good, compared to some of the alternatives. Yet MP3 is hard to avoid;
Besides that, Gstreamer ofers a command-line interface through gst-launch which is very useful to test the pipeline you are assembling in your program before you start to write code the actual code:
gst-launch filesrc location=/path/to/audiofile ! decodebin ! oss4sink
And if you need to build GStreamer on Windows, check this tutorial for Visual Studio.
PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA).
The MP3 support comes through libmad. There are tutorials that help building and using the library.
这篇关于c ++ mp3库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!