Microsoft DirectX 9.0 SDK Update (Summer 2004) |
Creating Segment Objects
You can create a segment object in any of the following ways:
- Load a file or resource object that supports the IDirectMusicSegment8 interface. Most segments are created this way.
- Get a motif from a
style by using the IDirectMusicStyle8::GetMotif method. - Use methods of the IDirectMusicComposer8 interface to create a composition or transition at run time.
- Make a copy of an existing segment by using the IDirectMusicSegment8::Clone method.
- Use the IDirectMusicBand8::CreateSegment method. This method creates a special type of secondary segment that is used only for making band changes.
- Use the IDirectMusicPatternTrack8::CreateSegment method to create a segment from a pattern track object. Most applications don't do this, because pattern track objects usually come from existing segments.
- Construct a segment from existing tracks. To do this, create a segment object by calling CoCreateInstance, and then add tracks by calling IDirectMusicSegment8::InsertTrack. This technique is not used by most applications.
See Also
- DirectMusic Tracks
- Loading Audio Data
- Making Band Changes Programmatically
- Using Compositional Elements
- Using Templates
- Using Transitions
© 2004 Microsoft Corporation. All rights reserved.