C# play MP3 file from specified time for the specified time

百般思念 提交于 2019-12-08 08:29:30

If you're using NAudio, look for a Seek method on the output stream -- the information returned from this Google search, http://www.google.com/search?q=seek+site:naudio.codeplex.com, should get you started.

You could also use some old but functional Windows APIs (the MCI interface) as shown here: http://forum.codecall.net/csharp-tutorials/20420-tutorial-playing-mp3-files-c.html demonstrates how to call MCI from C#. MCI uses a very simple string interface, so once you can call it at all it's pretty easy to use any command it supports, and it supports seeking, with the "seek [file] to [position]" command, as shown here: http://www.codeproject.com/KB/audio-video/MP3Example.aspx.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!