如何从中间播放mp3文件 [英] how to play a mp3 file from the middle

查看:112
本文介绍了如何从中间播放mp3文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

mciSendStringi("","","","");

我使用上面的功能播放mp3文件.现在我想玩 中间的mp3文件(即如果文件长度为5:32分钟),我想从2:00分钟开始播放.可以帮我怎么做吗?

I used the above function to play a mp3 file. Now I want to play the mp3 file from the middle (i.e) if the file is 5:32 minutes long I want to play it from 2:00 minutes. Can any help me how to do it?

推荐答案

类似这样的东西:

long millisecs = 120000;
long status = mciSendString(String.Format("seek MediaFile to {0}", millisecs), null, 0, IntPtr.Zero);

要确定文件的长度,请参见

To determine the length of the file, see this post

这篇关于如何从中间播放mp3文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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