wmppsPlaying event fired twice

12 views
Skip to first unread message

Bati9

unread,
Aug 17, 2011, 4:51:29 PM8/17/11
to
Hello
I have a wpf application that uses the Windows Media Player control to
play audio (after adding a reference to WMPLib, the player's object
class name is WMPLib.WindowsMediaPlayerClass).
The problem i'm noticing is that on every song the wmppsPlaying event
gets fired twice. I have boolean flag in that handler to make sure
only one call is handled but I'm trying to understand why is it doing
that.

Here's the sequence of events logged:

wmppsPlaying
wmppsBuffering
wmppsPlaying
wmppsMediaEnded
wmppsTransitioning

BTW, the reason why I care is because I have logic to pre-fetch the
next song to reduce the latency between each song - so basically i'm
manually controlling the player CurrentPlaylist, and this logic is
called from the wmppsPlaying event.

Reply all
Reply to author
Forward
0 new messages