O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

AudioPlayerAgent Sample

The custom audio player agent for this section includes a simple playlist, which includes both locally stored and remote audio files. The class is called BackgroundAudioPlayerAgent, and it is located in the WPUnleashed.BackgroundAudio project, within the BackgroundAudio solution in the downloadable sample code.

A static list of audio tracks defines the playlist, shown in the following excerpt:

static readonly List<AudioTrack> playList    = new List<AudioTrack>        {            new AudioTrack(new Uri("AudioFiles/Audio01.wma",                                    UriKind.Relative),                              "Ringtone 1",              // title                              "Windows Phone" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required