Microsoft DirectX 8.1 (C++) |
Many DirectMusic objects have to be loaded from a file or resource before they can be incorporated into a performance. The IDirectMusicLoader8 interface is used to manage the enumeration and loading of such objects, as well as to cache them so that they are not loaded more than once.
An application should have only one instance of the loader in existence at a time. You should create a single global loader object and not free it until there is no more loading to be done. This strategy ensures that objects are found and cached efficiently.
The DirectMusic implementation of IStream streams the data from the source. The parsing of the data is handled by the various objects themselves through their implementations of IPersistStream. As long as you are dealing only with standard DirectMusic data, you don't need to use these interfaces directly.
Loading of objects referenced by other objects is handled transparently. For example, suppose a
More information on using the loader is contained in the following topics:
See also Custom Loading in the Advanced Topics in DirectX Audio section.