Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何从任何音乐文件格式中获取波形,以便使用某种 gui 将其可视化。我想使用已经编写的库而不是自己编写的库。
有任何想法吗?
谢谢!
这取决于音乐文件格式。 LameLib可用于解码 mp3,libogg可用于解码 ogg。未压缩的 wav 文件不需要解码,因为文件存储原始 PCM 数据;你只需要读入文件头,那里有很多示例代码向你展示了如何做到这一点。
如果让您可视化音频波形的程序会有所帮助,请尝试 Audacity。
要让图书馆按照您的要求进行操作,请查看libsndfile。