C++ 如何创建一个 mp3 播放器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4839735/
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
How to create a mp3 player?
提问by xRobot
Possible Duplicate:
Building a simple mp3 music player
可能的重复:
构建一个简单的 mp3 音乐播放器
I want to create simplest mp3 player in C or C++.
我想用 C 或 C++ 创建最简单的 mp3 播放器。
What function or API do I have to use ?
我必须使用什么函数或 API?
回答by Dylnuge
If you just want to write a C or C++ program which plays an mp3 file, you might want to look here: How to play MP3 files in C?.
如果您只想编写一个播放 mp3 文件的 C 或 C++ 程序,您可能想看这里:如何用 C 播放 MP3 文件?.
If you are looking to write something more complex (say a full GUI application to select and play mp3s, including elements to play/pause, jump to a part of the song (and see what part is playing), and view song metadata, etc) than the best advice I can give you is to jump right into your program and start coding. The number of things that would need to be covered to give you an adequate response to a general question are very vast, and we don't know anything about what you are trying to do, what your experience is, or what you might have problems with.
如果你想写一些更复杂的东西(比如一个完整的 GUI 应用程序来选择和播放 mp3,包括播放/暂停的元素,跳转到歌曲的一部分(并查看正在播放的部分),以及查看歌曲元数据等) 而不是我能给你的最好的建议是直接进入你的程序并开始编码。要让您对一般性问题做出充分回答,需要涵盖的内容非常多,我们对您正在尝试做什么、您的经验是什么或您可能遇到的问题一无所知和。
If you jump into it and then ask questions if you get stuck on a part of it, it will overall be a lot more helpful for everyone.
如果您跳入其中,然后在遇到问题时提出问题,那么总体而言,这对每个人都会更有帮助。