Playing sounds with C++?

前端 未结 5 986
刺人心
刺人心 2021-02-06 16:10

How would i make it so in my program there is a button when that button is clicked i want it to play a .wma file without opening and media player?

5条回答
  •  梦谈多话
    2021-02-06 16:51

    For Windows, in all honesty your best bet is DirectShow. The RenderFile API allows you to play most audio file types with just a few lines of code.

    The best part about DirectShow is that it's a part of the Windows platform so you don't need to bundle an external component.

提交回复
热议问题