0

I'm trying to play a song in a WinForms C# application using the AxWMPLib COM control. However, I only want to play a specific 30 second region of that song. So far I can play the track from the beginning of that 30 second region (using the Ctrlcontrols.currentPosition member), but I have no way of specifying the end time.

What's the best way to go about playing only 30 seconds of this track?

Matthew Iselin
  • 10,400
  • 4
  • 51
  • 62

1 Answers1

1

I don't know of a way to do this entirely in the WMP control.

An alternative, and this may not be precise, but you could try creating a Timer with a 30 second tick time, then start that timer when you call axWmp.Play(...). When the timer ticks, call axWmp.Stop().

Judah Gabriel Himango
  • 58,906
  • 38
  • 158
  • 212