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

前端 未结 9 1812
陌清茗
陌清茗 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:11

    Not sure if this is still relevant. Simplest solution would be to use NAudio, which is a managed open source audio API written in C#. Another thing to try would be utilizing ffmpeg, and creating a process to ffplay.exe (the right binaries are under shared builds).

提交回复
热议问题