AudioTrack Class

Represents a single track of audio.

System.Object
  Microsoft.Phone.BackgroundAudio.AudioTrack

Namespace:  Microsoft.Phone.BackgroundAudio
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.

'Declaration
Public Class AudioTrack _
	Implements IEditableObject
<AudioTrack .../>

The AudioTrack type exposes the following members.

  NameDescription
Public methodAudioTrackCreates a new instance of the AudioTrack class.
Public methodAudioTrack(Uri, String, String, String, Uri)Creates and initializes a new instance of the AudioTrack class.
Public methodAudioTrack(Uri, String, String, String, Uri, String, EnabledPlayerControls)Creates and initializes a new instance of the AudioTrack class.
Top

  NameDescription
Public propertyAlbumText to display as the track’s album.
Public propertyAlbumArtThe path to the album art for the track.
Public propertyArtistText to display as the track's artist.
Public propertyDurationThe length of the track.
Public propertyPlayerControlsDetermines which playback controls are enabled in the system user interface.
Public propertySourceThe URI path to the track.
Public propertyTagAn arbitrary string associated with this track, used to store application-specific state.
Public propertyTitleText to display as the track's title.
Top

  NameDescription
Public methodBeginEditSets the track object into edit mode.
Public methodCancelEditThis method is not implemented for AudioTrack objects and always throws a NotSupportedException.
Public methodEndEditEnds an edit operation, saving all property changes to the underlying store.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

This class makes use of IEditableObject to enable batching of property change requests. For example, when a track changes, the application may want to update several pieces of metadata all at once, such as track name, artist, album, and so on.

Once the track has been created using one of the AudioTrack constructors, then the BeginEdit and EndEdit methods must be used to update the object.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2015 Microsoft