6

I need background player to play a single track in a cycle without a pause between end and beginning. How could I implement it?

I have tried to implement it by AudioPlayerAgent but it is not able to remove pause which is short but stay here.

Viacheslav Smityukh
  • 5,652
  • 4
  • 24
  • 42

2 Answers2

3

Maybe you should look at the BackgroudAudioPlayer.

More informations and some examples are available right here =>

http://msdn.microsoft.com/en-us/windowsphonetrainingcourse_musicplayerlab_topic2.aspx

Maybe you could use the event PlayStateChanged to launch again the same music.

Hope it helps :)

MarcD
  • 314
  • 1
  • 8
  • 1
    The question was about backgroundaudioplayer usage but the main question how to remove pause between end and beginning of a track. Restart playing from the StateChanged handler doesn't solve the issue. – Viacheslav Smityukh Nov 17 '12 at 09:17
0

What about using XNA Library?

Song song = Content.Load<Song>("BackgroundMusic");
MediaPlayer.Play(song);
MediaPlayer.Volume = 0.5f;
MediaPlayer.IsRepeating = true;

I am not sure it works as you want though.

Berni
  • 510
  • 4
  • 12