tags:

views:

193

answers:

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

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?

+1  A: 

Use NAudio.

Anton Gogolev
+1  A: 

Something like this perhaps:

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

Magnus Johansson