IITTrack Interface Reference
Inheritance diagram for IITTrack:
Detailed Description
Represents a track.A track represents a song in a single playlist. A song may be in more than one playlist, in which case it would be represented by multiple tracks.
You can retrieve the currently targeted (playing) track using IiTunes::CurrentTrack().
Typically, an IITrack is accessed through an IITTrackCollection.
You can retrieve all the tracks defined for a playlist using IITPlaylist::Tracks().
You can retrieve the currently selected track or tracks using IiTunes::SelectedTracks().
After calling IITLibraryPlaylist::AddFile(), IITLibraryPlaylist::AddFiles(), IITUserPlaylist::AddFile(), IITUserPlaylist::AddFiles(), IiTunes::ConvertFile(), IiTunes::ConvertFile2(), IiTunes::ConvertFiles(), IiTunes::ConvertFiles2(), IiTunes::ConvertTrack(), IiTunes::ConvertTrack2(), IiTunes::ConvertTracks(), or IiTunes::ConvertTracks2(), you can retrieve the added or converted tracks using IITOperationStatus::Tracks().
Public Member Functions | |
Methods | |
HRESULT | Delete () |
Delete this track. | |
HRESULT | Play () |
Start playing this track. | |
HRESULT | AddArtworkFromFile ([in] BSTR filePath,[out, retval] IITArtwork **iArtwork) |
Add artwork from an image file to this track. | |
Properties | |
HRESULT | Kind ([out, retval] ITTrackKind *kind) |
Returns the kind of the track. | |
HRESULT | Playlist ([out, retval] IITPlaylist **iPlaylist) |
Returns an IITPlaylist object corresponding to the playlist that contains the track. Use IITFileOrCDTrack::Playlists() or IITURLTrack::Playlists() to get the collection of all playlists that contain the song this track represents. | |
HRESULT | Album ([out, retval] BSTR *album) |
Returns the name of the album containing the track. | |
HRESULT | Album ([in] BSTR album) |
Set the name of the album containing the track. | |
HRESULT | Artist ([out, retval] BSTR *artist) |
Returns the name of the artist/source of the track. | |
HRESULT | Artist ([in] BSTR artist) |
Set the name of the artist/source of the track. | |
HRESULT | BitRate ([out, retval] long *bitrate) |
Returns the bit rate of the track (in kbps). | |
HRESULT | BPM ([out, retval] long *beatsPerMinute) |
Returns the tempo of the track (in beats per minute). | |
HRESULT | BPM ([in] long beatsPerMinute) |
Set the tempo of the track (in beats per minute). | |
HRESULT | Comment ([out, retval] BSTR *comment) |
Returns freeform notes about the track. | |
HRESULT | Comment ([in] BSTR comment) |
Set freeform notes about the track. | |
HRESULT | Compilation ([out, retval] VARIANT_BOOL *isCompilation) |
Returns true if this track is from a compilation album. | |
HRESULT | Compilation ([in] VARIANT_BOOL shouldBeCompilation) |
Set whether this track is from a compilation album. | |
HRESULT | Composer ([out, retval] BSTR *composer) |
Returns the composer of the track. | |
HRESULT | Composer ([in] BSTR composer) |
Set the composer of the track. | |
HRESULT | DateAdded ([out, retval] DATE *dateAdded) |
Returns the date the track was added to the playlist. | |
HRESULT | DiscCount ([out, retval] long *discCount) |
Returns the total number of discs in the source album. | |
HRESULT | DiscCount ([in] long discCount) |
Set the total number of discs in the source album. | |
HRESULT | DiscNumber ([out, retval] long *discNumber) |
Returns the index of the disc containing the track on the source album. | |
HRESULT | DiscNumber ([in] long discNumber) |
Set the index of the disc containing the track on the source album. | |
HRESULT | Duration ([out, retval] long *duration) |
Returns the length of the track (in seconds). | |
HRESULT | Enabled ([out, retval] VARIANT_BOOL *isEnabled) |
Returns true if the track is checked for playback. | |
HRESULT | Enabled ([in] VARIANT_BOOL shouldBeEnabled) |
Set whether this track is checked for playback. | |
HRESULT | EQ ([out, retval] BSTR *eq) |
Returns the name of the EQ preset of the track. | |
HRESULT | EQ ([in] BSTR eq) |
Set the name of the EQ preset of the track. | |
HRESULT | Finish ([in] long finish) |
Set the stop time of the track (in seconds). | |
HRESULT | Finish ([out, retval] long *finish) |
Returns the stop time of the track (in seconds). | |
HRESULT | Genre ([out, retval] BSTR *genre) |
Returns the music/audio genre (category) of the track. | |
HRESULT | Genre ([in] BSTR genre) |
Set the music/audio genre (category) of the track. | |
HRESULT | Grouping ([out, retval] BSTR *grouping) |
Returns the grouping (piece) of the track. | |
HRESULT | Grouping ([in] BSTR grouping) |
Set the grouping (piece) of the track. | |
HRESULT | KindAsString ([out, retval] BSTR *kind) |
Returns the text description of the track (e.g. "AAC audio file"). | |
HRESULT | ModificationDate ([out, retval] DATE *dateModified) |
Returns the modification date of the content of the track. | |
HRESULT | PlayedCount ([out, retval] long *playedCount) |
Returns the number of times the track has been played. | |
HRESULT | PlayedCount ([in] long playedCount) |
Set the number of times the track has been played. This property cannot be set if the track is not playable (e.g. a PDF file). | |
HRESULT | PlayedDate ([out, retval] DATE *playedDate) |
Returns the date and time the track was last played. | |
HRESULT | PlayedDate ([in] DATE playedDate) |
Set the date and time the track was last played. This property cannot be set if the track is not playable (e.g. a PDF file). | |
HRESULT | PlayOrderIndex ([out, retval] long *index) |
Returns the play order index of the track in the owner playlist (1-based). | |
HRESULT | Rating ([out, retval] long *rating) |
Returns the rating of the track (0 to 100). If the track rating has never been set, or has been set to 0, it will be computed based on the album rating. | |
HRESULT | Rating ([in] long rating) |
Set the rating of the track (0 to 100). If the track rating is set to 0, it will be computed based on the album rating. | |
HRESULT | SampleRate ([out, retval] long *sampleRate) |
Returns the sample rate of the track (in Hz). | |
HRESULT | Size ([out, retval] long *size) |
Returns the size of the track (in bytes). | |
HRESULT | Start ([out, retval] long *start) |
Returns the start time of the track (in seconds). | |
HRESULT | Start ([in] long start) |
Set the start time of the track (in seconds). | |
HRESULT | Time ([out, retval] BSTR *time) |
Returns the length of the track (in MM:SS format). | |
HRESULT | TrackCount ([out, retval] long *trackCount) |
Returns the total number of tracks on the source album. | |
HRESULT | TrackCount ([in] long trackCount) |
Set the total number of tracks on the source album. | |
HRESULT | TrackNumber ([out, retval] long *trackNumber) |
Returns the index of the track on the source album. | |
HRESULT | TrackNumber ([in] long trackNumber) |
Set the index of the track on the source album. | |
HRESULT | VolumeAdjustment ([out, retval] long *volumeAdjustment) |
Returns the relative volume adjustment of the track (-100% to 100%). | |
HRESULT | VolumeAdjustment ([in] long volumeAdjustment) |
Set the relative volume adjustment of the track (-100% to 100%). | |
HRESULT | Year ([out, retval] long *year) |
Returns the year the track was recorded/released. | |
HRESULT | Year ([in] long year) |
Set the year the track was recorded/released. | |
HRESULT | Artwork ([out, retval] IITArtworkCollection **iArtworkCollection) |
Returns a collection containing the artwork for the track. |
Member Function Documentation
|
Add artwork from an image file to this track.
|
|
Set the name of the album containing the track.
|
|
Returns the name of the album containing the track.
|
|
Set the name of the artist/source of the track.
|
|
Returns the name of the artist/source of the track.
|
|
Returns a collection containing the artwork for the track.
|
|
Returns the bit rate of the track (in kbps).
|
|
Set the tempo of the track (in beats per minute).
|
|
Returns the tempo of the track (in beats per minute).
|
|
Set freeform notes about the track.
|
|
Returns freeform notes about the track.
|
|
Set whether this track is from a compilation album.
|
|
Returns true if this track is from a compilation album.
|
|
Set the composer of the track.
|
|
Returns the composer of the track.
|
|
Returns the date the track was added to the playlist.
|
|
Delete this track. Note that if a track is deleted from a source's primary playlist, it will be deleted from all playlist's in that source.
|
|
Set the total number of discs in the source album.
|
|
Returns the total number of discs in the source album.
|
|
Set the index of the disc containing the track on the source album.
|
|
Returns the index of the disc containing the track on the source album.
|
|
Returns the length of the track (in seconds).
|
|
Set whether this track is checked for playback.
|
|
Returns true if the track is checked for playback.
|
|
Set the name of the EQ preset of the track.
|
|
Returns the name of the EQ preset of the track.
|
|
Returns the stop time of the track (in seconds).
|
|
Set the stop time of the track (in seconds).
|
|
Set the music/audio genre (category) of the track.
|
|
Returns the music/audio genre (category) of the track.
|
|
Set the grouping (piece) of the track. Generally used to denote movements within classical work.
|
|
Returns the grouping (piece) of the track. Generally used to denote movements within classical work.
|
|
Returns the kind of the track.
|
|
Returns the text description of the track (e.g. "AAC audio file").
|
|
Returns the modification date of the content of the track.
|
|
Start playing this track.
|
|
Set the number of times the track has been played. This property cannot be set if the track is not playable (e.g. a PDF file).
|
|
Returns the number of times the track has been played.
|
|
Set the date and time the track was last played. This property cannot be set if the track is not playable (e.g. a PDF file). A value of zero means no played date.
|
|
Returns the date and time the track was last played. A value of zero means no played date.
|
|
Returns an IITPlaylist object corresponding to the playlist that contains the track. Use IITFileOrCDTrack::Playlists() or IITURLTrack::Playlists() to get the collection of all playlists that contain the song this track represents.
|
|
Returns the play order index of the track in the owner playlist (1-based). You can pass this index to IITTrackCollection::ItemByPlayOrder() for the collection returned by IITPlaylist::Tracks() to retrieve an IITTrack object corresponding to this track.
|
|
Set the rating of the track (0 to 100). If the track rating is set to 0, it will be computed based on the album rating.
|
|
Returns the rating of the track (0 to 100). If the track rating has never been set, or has been set to 0, it will be computed based on the album rating.
|
|
Returns the sample rate of the track (in Hz).
|
|
Returns the size of the track (in bytes).
|
|
Set the start time of the track (in seconds).
|
|
Returns the start time of the track (in seconds).
|
|
Returns the length of the track (in MM:SS format).
|
|
Set the total number of tracks on the source album.
|
|
Returns the total number of tracks on the source album.
|
|
Set the index of the track on the source album.
|
|
Returns the index of the track on the source album.
|
|
Set the relative volume adjustment of the track (-100% to 100%).
|
|
Returns the relative volume adjustment of the track (-100% to 100%).
|
|
Set the year the track was recorded/released.
|
|
Returns the year the track was recorded/released.
|
Generated on Fri Mar 13 12:50:54 2009 for iTunes 8.1.0.52
©2004-2007 Apple Computer, Inc.