C#语音播放引擎cscore及其播放器

    xiaoxiao2021-03-25  102

    最近在找一个C#语音播放器的时候,才发现这个几乎很难找到,当然也存在自己找资料不太全的问题。

    但是至少这个是存在的,常见的还是Naudio的东西。但是说实话,除非XAML的WPF东西,不然Naudio做出来的界面化东西还真不怎样。

    不过幸运的是,Naudio平台也出来了一个界面化渲染的东西,也支持多种渲染方式。试验了下,效果还是不错,只是没有将播放与控制放在一起,很多操作还是不便。

    于是继续寻找,换个搜索方式,还是看到了cscore, 代码网址是:https://github.com/filoe/cscore

    最主要的发现,它有很多采用它底层库的网站,而且还不少。在网页介绍如下:

    Some projects using already using cscore:

    Dopamine: An music player which tries to keep listening to music clean and simple.Hurricane: Is a powerful music player written in C# based on CSCore sound library.Sharpex2D: A game engine which allows you to create beautiful 2D games under .NET for Windows and Mono compatible systemsTurnt-Ninja: A beat-fighting-ninja-like-get-turnt rhythm game inspired by the wonderful Super Hexagon by Terry Cavanagh.HTLED: A audio visualization displayed on a selfmade 32x16 LED matrix....

    非常不错的东西。

    再继续往下挖,发现有不少基本它做的界面化的控制,非常轻便,而且可以很方便控制。如其中一个很小的代码就可以实现如下的效果:

    在一番改写之后,已经满足要求。特此记录一下,也为大家找资料提供一个入口。

    当然也看了下cscore的源码,里面的内核非常全,还把ffmpeg也支持进来了,非常不错。

    转载请注明原文地址: https://ju.6miu.com/read-16116.html

    最新回复(0)