IDirectMusicPerformance::AssignPChannelBlock

The IDirectMusicPerformance::AssignPChannelBlock method assigns a block of 16 performance channels (PChannels) to the performance and maps them to a port and channel group. This method must be called when a port has been added to a performance, except when the default port has been added by passing NULL to IDirectMusicPerformance::AddPort.

HRESULT AssignPChannelBlock(
  DWORD dwBlockNum,
  IDirectMusicPort* pPort,
  DWORD dwGroup
);
 

Parameters

dwBlockNum
Block number, where 0 represents channels 0-15, 1 represents channels 16-31, and so on.
pPort
Port to which the channels are assigned.
dwGroup
Channel group on the port. Must be 1 or greater.

Return Values

If the method succeeds, the return value is S_OK or S_FALSE (see Remarks).

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

E_INVALIDARG
E_POINTER

Remarks

The method returns S_FALSE if dwGroup is out of the range of the port. The channels have been assigned, but the port cannot play this group.

The method returns E_INVALIDARG if the port hasn't been added to the performance through a call to the IDirectMusicPerformance::AddPort 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

IDirectMusicPerformance::AssignPChannel, IDirectMusicPerformance::PChannelInfo, Channels