Microsoft DirectX 8.1 (Visual Basic) |
Many DirectMusic objects have to be loaded from a file or resource before they can be incorporated into a performance. The DirectMusicLoader8 class is used to manage the loading of such objects.
In most cases, an application should have only one DirectMusicLoader8 object 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 loaded efficiently.
However, if your application loads a segment more than once, you should be aware that because of the caching system used internally by DirectMusic, on subsequent loads you might get back the same segment object you were using before, and it will still have any settings you previously gave it, such as start and loop points or a connection to a
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: