Microsoft DirectX 8.1 (C++)

Loader

The loader (IDirectMusicLoader8) is an object that gets other objects. It is generally one of the first objects created in a DirectX Audio application. The loader is used to load all audio content, including DirectMusic segment files, DLS collections, MIDI files, and both mono and stereo wave files. It can also load data stored in resources.

Any object that encapsulates data from a file or resource supports the IDirectMusicObject8 interface. The loader gets this interface and then uses it to initiate the process of streaming the data into an object in your application. Data objects parse themselves through their implementations of IPersistStream, and the entire loading process is carried out automatically. All you need to do is pass a description of the object to the loader, along with a request for the desired interface, such as IDirectMusicSegment8.