IT tutorials
 
Technology
 

Windows Phone 8 : Coordinating Background Audio Playback (part 2) - Representing Audio Files with the AudioTrack Class, Creating a Custom Audio Player Agent

3/1/2014 7:58:17 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

4. Representing Audio Files with the AudioTrack Class

The AudioTrack class includes information about the location of an audio file, as well as track metadata, such as the track’s title. Table 3 describes each of the AudioTrack properties.

TABLE 3. AudioTrack Properties

Image

AudioTrack implements IEditableObject to enable batching of property change requests. After an AudioTrack object has been instantiated, it cannot be changed without putting it in edit mode first. AudioTrack uses an IAudioTrack backing field, which links the managed AudioTrack object to the native audio system via Com Interop. To make changes to an AudioTrack object, its BeginEdit method must be called. When all changes have been made, EndEdit should be called. This commits the property changes to the OS via the native IAudioTrack object.

5. Creating a Custom Audio Player Agent

An audio player agent can be created by selecting the Windows Phone Audio Playback Agent project type from the Visual Studio New Project dialog (see Figure 1). This produces a new project that includes a class that derives from AudioPlayerAgent.

Image

FIGURE 1 Visual Studio Windows Phone agent projects.

When you link to an Audio Player Agent project from your main project, a BackgroundServiceAgent task definition is added to your main project’s WMAppManifest.xml file, resembling the following:

<Tasks>
  <DefaultTask  Name="_default" NavigationPage="MainPage.xaml"/>
  <ExtendedTask Name="BackgroundTask">
      <BackgroundServiceAgent Specifier="AudioPlayerAgent"
           Name="<Unique name within the app>"
           Source="<Assembly>"
           Type="<Namespace.Class>" />
  </ExtendedTask>
</Tasks>

It is not necessary to use Visual Studio’s Audio Player Agent project template to create a custom background audio agent. You can create the class and add the task definition to the WMAppManifest.xml file manually if you so choose.

 
Others
 
- Windows Phone 8 : Coordinating Background Audio Playback (part 1) - Background Audio Player
- Microsoft Exchange Server 2013 : Site mailboxes (part 3) - The life cycle of site mailboxes, Site mailbox provisioning policy
- Microsoft Exchange Server 2013 : Site mailboxes (part 2) - How site mailboxes work - Synchronization between Exchange and SharePoint
- Microsoft Exchange Server 2013 : Site mailboxes (part 1) - How site mailboxes work
- Microsoft Exchange Server 2013 : Migration to modern public folders
- Microsoft Exchange Server 2013 : Migration to modern public folders
- Windows 8 : Using Secure Boot and SmartScreen Filter
- Windows 8 : Configuring network discovery and wireless security (part 2)
- Windows 8 : Configuring network discovery and wireless security (part 1) - Creating network discovery profiles
- Sharepoint 2013 : Search for People (in SharePoint Server)
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us