我如何使用下一个和上一个按钮. [英] how I use next and previous button.

查看:60
本文介绍了我如何使用下一个和上一个按钮.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Interop.QuartzTypeLib dll,因此我想在媒体播放器中添加下一个和前进按钮.所以我该怎么做...谢谢..

I am using Interop.QuartzTypeLib dll, so I want add next and forward button in a media player. so how I do this... thanks..

推荐答案

据我所知,这个lib是DirectShow的包装,因此可以在托管环境中使用. DirectShow主要包含有关播放的内容.要实现下一首和上一首,您需要具有某种f播放列表(可能将歌曲存储在arraylist中),并且当用户按下下一首/上一首歌曲时,您只需从列表中获取下一首歌曲,然后使用quartzlib播放即可.
As far as i know this lib is a wrapper on directshow so that it can be used from managed world. The directshow has mainly stuff dealing with playback. to achieve next and previous you need to have some kind f playlist(perhaps store songs in arraylist) and when user presses the next/prev then you just fetch the next song from list and play using quartzlib.


可以使用简单的类来创建播放列表,该类可以具有函数下一个或上一个文件的returninf文件路径.然后可以将此路径推送到crystallib进行播放
The playlist can be created using simple class which can have functions returninf filepath of next or previous file. This path can then be pushed to quartzlib for playback


MusicDrawer-A-Simple-Music-player-using-WMP-SDK[^]

This is a music player I wrote some time back. This is using WMPSDK for playback but the playlist is created inside this application only.

So you can replace the MWMPEngine.cs class with your class that will use directshow using quartzlib and the playlist and other classes can be used/referred from here.

I have an exact same player written using managed directX around 2.5 years back. which is more preferred way of doing things from C# than using quartzlib. I suggest you have a look at Managed direct-X too unless your requirement is specifically stating the use of quartzlib. I will check my home computer''s hard-drive to see if I could find the directX version of this player.


这篇关于我如何使用下一个和上一个按钮.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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