如何在不使用COM组件的情况下使用C#开发音乐播放器。 [英] How do I develop a music player in C# without using COM components.

查看:222
本文介绍了如何在不使用COM组件的情况下使用C#开发音乐播放器。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试用C#开发一个音乐播放器,它有一个播放,暂停,音量和搜索栏功能的播放列表。我也将它连接到数据库。我搜索了类似的项目,我找到的是使用com组件开发的玩家,我不想这样做。任何人都可以帮助我或提供有用的链接吗?

解决方案

我不相信有任何音频播放器策略不需要使用API​​调用,尽管你可能会考虑嵌入一个Wi​​ndows Media Player Control ...它包装API调用,这样你就可以在更高的抽象层次上进行交互......也许有人会认为这是托管的?



我认为你最好的资源是NAudio:[ ^ ]

看看PVS AV播放器,它是MCI上的.NET包装器。它可以在这里的CodeProject 上免费获取[ ^ ]。我在我自己的应用程序中使用过它,发现它使用起来非常整洁。






在wpf中使用MediaElement ,在WinForm中,据我所知,没有使用com组件的解决方案...查看WPF MediaElement上的msdn文档。



希望这有帮助。 ..



LG


Im trying to develop a music player in C# which has a playlist with play, pause, volume and seek bar functions. I will connect it to a database as well. I searched for similar projects and all I found were players developed using com component, which I don't want to. Can anyone help me with it or provide useful links?

解决方案

I do not believe there is any audio-player strategy that will not require use of API calls, although you might consider embedding a Windows Media Player Control ... which wraps the API calls so you can interact at a higher level of abstraction ... perhaps one could consider that "managed" ?

I think your best resource is NAudio: [^]


Take a look at the PVS AV Player, which is a .NET wrapper on the MCI. It is available free on here on CodeProject[^]. I have used this in my own applications, and find it incredibly tidy to use.


Hi,

In wpf use MediaElement, in WinForm, as far as I know, there are no solutions without using a com component... Check out msdn documentation on WPF MediaElement.

Hope this helped...

LG


这篇关于如何在不使用COM组件的情况下使用C#开发音乐播放器。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆