The DirectMusicPerformance.SetPort method sets the active port for the performance. This method must be called after the performance is initialized and before any instruments are downloaded or any segment is played.
object.SetPort(index As Long, numGroups As Long)
Parameters
object
Object expression that resolves to a DirectMusicPerformance object.
index
Index of the port. Must be in the range from 1 through the value returned by DirectMusicPerformance.GetPortCount, or –1 for the default port.
numGroups
Number of channel groups on the port. Must be less than or equal to the number of channel groups reported in the lMaxChannelGroups member of the DMUS_PORTCAPS type returned by the DirectMusicPerformance.GetPortCaps method.
Remarks
Each channel group consists of 16 channels. Allocate enough channel groups to accommodate all performance channels in the segments that you intend to play. For MIDI files, one channel group is sufficient. The Microsoft Software Synthesizer supports up to 1000 channel groups.
不知你调用的是不是这一个?
这段文章给你参考吧。
-------------------------
我流落在凄凉的世界里-孤苦伶仃
我过着动荡无助的生活-四处漂泊