Microsoft DirectX 8.0 (C++) |
Inserts the supplied track into the segment's list of tracks.
HRESULT InsertTrack( IDirectMusicTrack* pTrack, DWORD dwGroupBits );
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the following error values:
DMUS_E_NOT_INIT |
E_FAIL |
E_INVALIDARG |
E_OUTOFMEMORY |
E_POINTER |
Tracks are put in groups to link them correctly. For example, a segment might contain two style tracks and two mute tracks. Each style track would be put in a different group, along with its associated mute track. For more information on track groups, see Identifying the Track.
If the segment is currently playing, the new track is not included in playback because the segment state was not initialized with the new track.
This method initializes the track. However, if the track data is subsequently changed, the application must initialize it again by calling IDirectMusicTrack8::Init.
Header: Declared in dmusici.h.
IDirectMusicSegment8::RemoveTrack, IDirectMusicSegment8::GetTrackGroup