如何当一个MP3文件播放完毕检测 [英] How to detect when a mp3 file has finished playing
本文介绍了如何当一个MP3文件播放完毕检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的C#窗口形式使以播放MP3 file.I这个使用此代码确实
My c# windows form is enable to play an mp3 file.I did this using this code
WMPLib.WindowsMediaPlayer wplayer;
wplayer = new WMPLib.WindowsMediaPlayer();
wplayer.URL = "c:/Standup.mp3";
wplayer.controls.play();
这完美的作品,但我想知道什么时候该文件已完成播放,这样我可以重新启动它。
this works perfectly but i want to know when the file has finished playing so that i can restart it.
请我该怎么办呢?
推荐答案
如果你不'T一定要知道什么时候该文件已完成任何其他目的,而不是循环,您可以考虑setMode方法打开跟踪循环上。
If you don't necessarily need to know when the file has completed for any other purposes than looping, you may consider the setMode method to turn track looping on.
的http://msdn.microsoft.com/en-us/library/windows/台式机/ dd564867(v = vs.85)的.aspx
这篇关于如何当一个MP3文件播放完毕检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文