0

I am trying to loop an mp3 on button press using the mediaElement control as part of a WP7 app. I am using the MediaEnded event handler to reset to the beginning as follows:

{ mediaElement1.Position = TimeSpan.FromSeconds(0); mediaElement1.Play(); }

However, when I do this, I hear a pause each time the clip restarts. How can I loop the background music more seamlessly? When I loop the file in audacity, I don't hear any pause at all.

I am just starting to learn how to program so I apologize if this is a basic question. I searched and could not find an answer to this exact question.

sv77
  • 67
  • 1
  • 4

1 Answers1

0

I have experienced the same problem with the mediaElement in WPF. Unfortunately, I was unable to find a solution to this problem when using the MediaElement.

The only real option for perfect performance would be to use XNA for the audio.

Here's my original question around playback, there is one alternative answer, but it didn't help me at the time, it might work for you though

Community
  • 1
  • 1
Chris Nicol
  • 10,256
  • 7
  • 39
  • 49