iTunes COM Interface: IITTrack Interface Reference

iTunes COM

IITTrack Interface Reference

Inheritance diagram for IITTrack:

IITObject IITFileOrCDTrack IITURLTrack List of all members.

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

HRESULT IITTrack::AddArtworkFromFile [in] BSTR  filePath,
[out, retval] IITArtwork **  iArtwork
 

Add artwork from an image file to this track.

Parameters:
filePath The full path to the image file containing artwork to add.
iArtwork Returns an IITArtwork object representing the new artwork.
Return values:
S_OK The operation was successful.
E_POINTER filePath or iArtwork is NULL.
E_INVALIDARG filePath is empty or too long.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Album [in] BSTR  album  ) 
 

Set the name of the album containing the track.

Parameters:
album The new name of the album containing the track.
Return values:
S_OK The operation was successful.
E_POINTER album is NULL.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Album [out, retval] BSTR *  album  ) 
 

Returns the name of the album containing the track.

Parameters:
album Returns the name of the album containing the track.
Return values:
S_OK The operation was successful.
E_POINTER album is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Artist [in] BSTR  artist  ) 
 

Set the name of the artist/source of the track.

Parameters:
artist The new artist/source of the track.
Return values:
S_OK The operation was successful.
E_POINTER artist is NULL.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Artist [out, retval] BSTR *  artist  ) 
 

Returns the name of the artist/source of the track.

Parameters:
artist Returns the name of the artist/source of the track.
Return values:
S_OK The operation was successful.
E_POINTER artist is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Artwork [out, retval] IITArtworkCollection **  iArtworkCollection  ) 
 

Returns a collection containing the artwork for the track.

Parameters:
iArtworkCollection Collection of IITArtwork objects.
Return values:
S_OK The operation was successful.
E_POINTER iArtworkCollection is NULL.
ITUNES_E_OBJECTDELETED This source is no longer available.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::BitRate [out, retval] long *  bitrate  ) 
 

Returns the bit rate of the track (in kbps).

Parameters:
bitrate Returns the bit rate of the track (in kbps).
Return values:
S_OK The operation was successful.
E_POINTER bitrate is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::BPM [in] long  beatsPerMinute  ) 
 

Set the tempo of the track (in beats per minute).

Parameters:
beatsPerMinute The new tempo of the track (in beats per minute).
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::BPM [out, retval] long *  beatsPerMinute  ) 
 

Returns the tempo of the track (in beats per minute).

Parameters:
beatsPerMinute Returns the tempo of the track (in beats per minute).
Return values:
S_OK The operation was successful.
E_POINTER beatsPerMinute is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Comment [in] BSTR  comment  ) 
 

Set freeform notes about the track.

Parameters:
comment The new freeform notes about the track.
Return values:
S_OK The operation was successful.
E_POINTER comment is NULL.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Comment [out, retval] BSTR *  comment  ) 
 

Returns freeform notes about the track.

Parameters:
comment Returns freeform notes about the track.
Return values:
S_OK The operation was successful.
E_POINTER comment is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Compilation [in] VARIANT_BOOL  shouldBeCompilation  ) 
 

Set whether this track is from a compilation album.

Parameters:
shouldBeCompilation True if this track should be from a compilation album.
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Compilation [out, retval] VARIANT_BOOL *  isCompilation  ) 
 

Returns true if this track is from a compilation album.

Parameters:
isCompilation Returns true if this track is from a compilation album.
Return values:
S_OK The operation was successful.
E_POINTER isCompilation is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Composer [in] BSTR  composer  ) 
 

Set the composer of the track.

Parameters:
composer The new composer of the track.
Return values:
S_OK The operation was successful.
E_POINTER composer is NULL.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Composer [out, retval] BSTR *  composer  ) 
 

Returns the composer of the track.

Parameters:
composer Returns the composer of the track.
Return values:
S_OK The operation was successful.
E_POINTER composer is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::DateAdded [out, retval] DATE *  dateAdded  ) 
 

Returns the date the track was added to the playlist.

Parameters:
dateAdded Returns the date the track was added to the playlist.
Return values:
S_OK The operation was successful.
E_POINTER dateAdded is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Delete  ) 
 

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.

Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED The track cannot be deleted.
ITUNES_E_OBJECTDELETED This track has been deleted already.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::DiscCount [in] long  discCount  ) 
 

Set the total number of discs in the source album.

Parameters:
discCount The new total number of discs in the source album.
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::DiscCount [out, retval] long *  discCount  ) 
 

Returns the total number of discs in the source album.

Parameters:
discCount Returns the total number of discs in the source album.
Return values:
S_OK The operation was successful.
E_POINTER discCount is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::DiscNumber [in] long  discNumber  ) 
 

Set the index of the disc containing the track on the source album.

Parameters:
discNumber The new index of the disc containing the track on the source album.
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::DiscNumber [out, retval] long *  discNumber  ) 
 

Returns the index of the disc containing the track on the source album.

Parameters:
discNumber Returns the index of the disc containing the track on the source album.
Return values:
S_OK The operation was successful.
E_POINTER discNumber is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Duration [out, retval] long *  duration  ) 
 

Returns the length of the track (in seconds).

Parameters:
duration Returns the length of the track (in seconds).
Return values:
S_OK The operation was successful.
E_POINTER duration is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Enabled [in] VARIANT_BOOL  shouldBeEnabled  ) 
 

Set whether this track is checked for playback.

Parameters:
shouldBeEnabled True if the track should be checked for playback.
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Enabled [out, retval] VARIANT_BOOL *  isEnabled  ) 
 

Returns true if the track is checked for playback.

Parameters:
isEnabled Returns true if the track is checked for playback.
Return values:
S_OK The operation was successful.
E_POINTER isEnabled is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::EQ [in] BSTR  eq  ) 
 

Set the name of the EQ preset of the track.

Parameters:
eq The new name of the EQ preset of the track.
Return values:
S_OK The operation was successful.
E_POINTER eq is NULL.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::EQ [out, retval] BSTR *  eq  ) 
 

Returns the name of the EQ preset of the track.

Parameters:
eq Returns the name of the EQ preset of the track. Will be set to NULL if no EQ preset is assigned to the track.
Return values:
S_OK The operation was successful.
E_POINTER eq is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Finish [out, retval] long *  finish  ) 
 

Returns the stop time of the track (in seconds).

Parameters:
finish Returns the stop time of the track (in seconds).
Return values:
S_OK The operation was successful.
E_POINTER finish is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Finish [in] long  finish  ) 
 

Set the stop time of the track (in seconds).

Parameters:
finish The new stop time of the track (in seconds).
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Genre [in] BSTR  genre  ) 
 

Set the music/audio genre (category) of the track.

Parameters:
genre The new music/audio genre (category) of the track.
Return values:
S_OK The operation was successful.
E_POINTER genre is NULL.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Genre [out, retval] BSTR *  genre  ) 
 

Returns the music/audio genre (category) of the track.

Parameters:
genre Returns the music/audio genre (category) of the track.
Return values:
S_OK The operation was successful.
E_POINTER genre is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Grouping [in] BSTR  grouping  ) 
 

Set the grouping (piece) of the track.

Generally used to denote movements within classical work.

Parameters:
grouping The new grouping (piece) of the track.
Return values:
S_OK The operation was successful.
E_POINTER grouping is NULL.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Grouping [out, retval] BSTR *  grouping  ) 
 

Returns the grouping (piece) of the track.

Generally used to denote movements within classical work.

Parameters:
grouping Returns the grouping (piece) of the track.
Return values:
S_OK The operation was successful.
E_POINTER grouping is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Kind [out, retval] ITTrackKind kind  ) 
 

Returns the kind of the track.

Parameters:
kind Returns the kind of the track.
Return values:
S_OK The operation was successful.
E_POINTER kind is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::KindAsString [out, retval] BSTR *  kind  ) 
 

Returns the text description of the track (e.g. "AAC audio file").

Parameters:
kind Returns the text description of the track.
Return values:
S_OK The operation was successful.
E_POINTER kind is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::ModificationDate [out, retval] DATE *  dateModified  ) 
 

Returns the modification date of the content of the track.

Parameters:
dateModified Returns the modification date of the content of the track.
Return values:
S_OK The operation was successful.
E_POINTER dateModified is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Play  ) 
 

Start playing this track.

Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::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).

Parameters:
playedCount The new number of times the track has been played.
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::PlayedCount [out, retval] long *  playedCount  ) 
 

Returns the number of times the track has been played.

Parameters:
playedCount Returns the number of times the track has been played.
Return values:
S_OK The operation was successful.
E_POINTER playedCount is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::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).

A value of zero means no played date.

Parameters:
playedDate The new date and time the track was last played.
Return values:
S_OK The operation was successful.
E_INVALIDARG playedDate is invalid.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::PlayedDate [out, retval] DATE *  playedDate  ) 
 

Returns the date and time the track was last played.

A value of zero means no played date.

Parameters:
playedDate Returns the date and time the track was last played.
Return values:
S_OK The operation was successful.
E_POINTER playedDate is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::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.

Parameters:
iPlaylist Returns an IITPlaylist object corresponding to the playlist that contains the track.
Return values:
S_OK The operation was successful.
E_POINTER iPlaylist is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::PlayOrderIndex [out, retval] long *  index  ) 
 

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.

Parameters:
index Returns the play order index of the track in the owner playlist (1-based).
Return values:
S_OK The operation was successful.
E_POINTER index is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::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.

Parameters:
rating The new rating of the track (0 to 100). If rating is outside this range, it will be pinned.
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::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.

Parameters:
rating Returns the rating of the track (0 to 100).
Return values:
S_OK The operation was successful.
E_POINTER rating is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::SampleRate [out, retval] long *  sampleRate  ) 
 

Returns the sample rate of the track (in Hz).

Parameters:
sampleRate Returns the sample rate of the track (in Hz).
Return values:
S_OK The operation was successful.
E_POINTER sampleRate is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Size [out, retval] long *  size  ) 
 

Returns the size of the track (in bytes).

Parameters:
size Returns the size of the track (in bytes).
Return values:
S_OK The operation was successful.
E_POINTER size is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Start [in] long  start  ) 
 

Set the start time of the track (in seconds).

Parameters:
start The new start time of the track (in seconds).
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Start [out, retval] long *  start  ) 
 

Returns the start time of the track (in seconds).

Parameters:
start Returns the start time of the track (in seconds).
Return values:
S_OK The operation was successful.
E_POINTER start is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Time [out, retval] BSTR *  time  ) 
 

Returns the length of the track (in MM:SS format).

Parameters:
time Returns the length of the track (in MM:SS format).
Return values:
S_OK The operation was successful.
E_POINTER time is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::TrackCount [in] long  trackCount  ) 
 

Set the total number of tracks on the source album.

Parameters:
trackCount The new total number of tracks on the source album.
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::TrackCount [out, retval] long *  trackCount  ) 
 

Returns the total number of tracks on the source album.

Parameters:
trackCount Returns the total number of tracks on the source album.
Return values:
S_OK The operation was successful.
E_POINTER trackCount is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::TrackNumber [in] long  trackNumber  ) 
 

Set the index of the track on the source album.

Parameters:
trackNumber The new index of the track on the source album.
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::TrackNumber [out, retval] long *  trackNumber  ) 
 

Returns the index of the track on the source album.

Parameters:
trackNumber Returns the index of the track on the source album.
Return values:
S_OK The operation was successful.
E_POINTER trackNumber is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::VolumeAdjustment [in] long  volumeAdjustment  ) 
 

Set the relative volume adjustment of the track (-100% to 100%).

Parameters:
volumeAdjustment The new relative volume adjustment of the track (-100% to 100%). If volumeAdjustment is outside this range, it will be pinned.
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::VolumeAdjustment [out, retval] long *  volumeAdjustment  ) 
 

Returns the relative volume adjustment of the track (-100% to 100%).

Parameters:
volumeAdjustment Returns the relative volume adjustment of the track (-100% to 100%).
Return values:
S_OK The operation was successful.
E_POINTER volumeAdjustment is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Year [in] long  year  ) 
 

Set the year the track was recorded/released.

Parameters:
year The new year the track was recorded/released.
Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITTrack::Year [out, retval] long *  year  ) 
 

Returns the year the track was recorded/released.

Parameters:
year Returns the year the track was recorded/released.
Return values:
S_OK The operation was successful.
E_POINTER year is NULL.
ITUNES_E_OBJECTDELETED This track has been deleted.
E_FAIL An unexpected error occurred.


Generated on Fri Mar 13 12:50:54 2009 for iTunes 8.1.0.52
©2004-2007 Apple Computer, Inc.