IDirectMusicBand::Download

The IDirectMusicBand::Download method downloads the DLS data for instruments in the band to a performance object. The method downloads each instrument in the band by calling the IDirectMusicPerformance::DownloadInstrument method. DownloadInstrument, in turn, uses the PChannel of the instrument to find the appropriate port, and then calls the IDirectMusicPort::DownloadInstrument method on that port.

Once a band has been downloaded, the instruments in the band may be selected, either individually with program change MIDI messages, or all at once by playing a band segment created through a call to the IDirectMusicBand::CreateSegment method.

HRESULT Download(
  IDirectMusicPerformance* pPerformance
);
 

Parameters

pPerformance
Performance to which instruments are to be downloaded. The performance manages the mapping of PChannels to DirectMusic ports.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method may return one of the following error values:

E_OUTOFMEMORY
E_POINTER

Remarks

Because a downloaded band uses synthesizer resources, it should be unloaded when no longer needed, by using the IDirectMusicBand::Unload method.

QuickInfo

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dmusici.h.

See Also

IDirectMusicBand::Unload