Creating Audiopaths
Applications can set up audiopaths in the following ways:
- Create one or more standard audiopaths by using IDirectMusicPerformance8::CreateStandardAudioPath. See Standard Audiopaths.
- Create a default standard audiopath for the performance in the call to IDirectMusicPerformance8::InitAudio. See Default Audiopath.
- Have DirectMusic create an audiopath from the segment's audiopath configuration when the segment is played. Audiopaths created in this way are temporary and not visible to the application.
- Obtain an audiopath configuration from a file authored in DirectMusic Producer and pass the configuration object to IDirectMusicPerformance8::CreateAudioPath.
An audiopath configuration object can be loaded just like any other object, by using IDirectMusicLoader8::GetObject or IDirectMusicLoader8::LoadObjectFromFile. A configuration embedded in a segment can be retrieved by using IDirectMusicSegment8::GetAudioPathConfig.
The audiopath configuration object does not have a unique interface or methods, and your application cannot change the configuration in any way. All you can do with the object is pass it, by its IUnknown interface, to IDirectMusicPerformance8::CreateAudioPath. For example code, see Playing Sounds on Audiopaths.
Audiopath configurations are the only means of creating nonstandard audiopaths. For instance, if different performance channels are to be routed to different buffers, this mapping must be specified in the audiopath configuration of a segment.