In This Chapter
Using the background audio player with an audio player agent
Creating a UI for controlling the background audio player
The Universal Volume Control (UVC)
Responding to user actions in an audio player agent
Unit testing and the background audio player
Monitoring audio playback progress
Creating audio streaming agents
Using a custom audio streaming agent to play audio stored as assembly resources
Windows Phone allows you to create apps that respond to the Universal Volume Control (UVC) on the phone and, in conjunction with an onscreen menu, coordinate the playback of audio, even when your app is not running in the foreground.
This chapter begins with an overview of the background audio player and shows how it is used to control the playback of local or remote audio files. You look at how audio file information is represented by the AudioTrack
class and examine the role of background audio agents, which are used to coordinate audio playback while your app is not running in the foreground.
The chapter then demonstrates how to build a UI that leverages the background audio agent for controlling playback while your app is in the foreground.
Finally, the chapter examines audio streaming agents and how they are used to provide custom streaming and decoding of audio files. You see how a custom audio streaming agent can be employed to play audio directly from an assembly resource, something that is not possible using the built-in streaming and decoding system of the phone.
3.139.80.15