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?

Motti
  • 110,860
  • 49
  • 189
  • 262
RV.
  • 2,782
  • 8
  • 39
  • 51

1 Answers1

2

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

Community
  • 1
  • 1
Magnus Johansson
  • 28,010
  • 19
  • 106
  • 164