How can I play compressed sound files in C# in a portable way?

前端 未结 9 1807
陌清茗
陌清茗 2020-12-14 02:43

Is there a portable, not patent-restricted way to play compressed sound files in C# / .Net? I want to play short \"jingle\" sounds on various events occuring in the program.

9条回答
  •  鱼传尺愫
    2020-12-14 03:23

    There is no way for you to do this without using something else for your play handling.

    Using the System.Diagnostic will launch an external software and I doubt you want that, right? You just want X sound file to play in the background when Y happens in your program, right?

    Voted up because it looks like an interesting question. :D

提交回复
热议问题