有没有比 mciSendString 更好的播放 Mp3 的方法?

is there any better way to play Mp3 than mciSendString?

有没有比 mciSendString 更好的播放 Mp3 的方法? mciSendString 很烂,很难在多线程中使用,eg.hard 来获取当前的 PlayingState

我建议使用 DirectShow 或 Windows Media Foundation,因为两者都有灵活的 API 用于基于文件的播放(您不必处理读取文件和理解格式、查找编解码器等问题。 ) 并且仍然公开播放控制。请参阅这些文章:

  1. DirectShow 和 IGraphBuilder(非常简单明了)- How To Play a File
  2. How to Play Media Files with Media Foundation
  3. Link to example from the first link