Microsoft DirectX 8.0 (C++) |
Downloads an instrument to the DLS device. Downloading an instrument means handing the data that makes up the instrument to the DLS device. This includes articulation data and all waves needed by the instrument. To save wave space, only waves and articulation required for a range are downloaded. The method returns an IDirectMusicDownloadedInstrument8 interface pointer, which is later used to unload the instrument.
HRESULT DownloadInstrument( IDirectMusicInstrument *pInstrument, IDirectMusicDownloadedInstrument **ppDownloadedInstrument, DMUS_NOTERANGE *pNoteRanges, DWORD dwNumNoteRanges; );
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the following error values:
E_POINTER |
E_OUTOFMEMORY |
E_NOTIMPL |
To prevent memory loss, the instrument must be unloaded by calling both IDirectMusicPort8::UnloadInstrument and IDirectMusicDownloadedInstrument8::Release when it is no longer needed.
Header: Declared in dmusicc.h.