IDirectMusicSegment::SetPChannelsUsed

The IDirectMusicSegment::SetPChannelsUsed method sets the performance channels (PChannels) this segment uses. This method is usually called by a track in the IDirectMusicTrack::Init method, in order to inform the segment which PChannels the track uses.

HRESULT SetPChannelsUsed(
  DWORD dwNumPChannels,
  DWORD* paPChannels
);
 

Parameters

dwNumPChannels
The number of PChannels to set. This must be equal to the number of members in the array pointed to by paPChannels.
paPChannels
Points to an array of PChannels.

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_INVALIDARG
E_OUTOFMEMORY
E_POINTER

Remarks

The purpose of this method is to allow the performance to know which ports are being used by the segment, so that it can determine the actual latency rather than providing for the worst case.

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

Latency and Bumper Time, Channels