DirectX SDK

Default Port

Under Windows 95 and versions of Windows 98 prior to Windows 98 Second Edition, and always when hardware that supports DLS is not available, the Microsoft Software Synthesizer is the default port. Under later versions of Windows 98 and under Windows 2000, a hardware synthesizer might be the default port.

[C++]

If you want your application to use the default port, you do not have to call the IDirectMusic::CreatePort method before adding the port to the performance. Instead, you can pass NULL to IDirectMusicPerformance::AddPort.

Obtain the default port by a call to IDirectMusic::GetDefaultPort, and then check its capabilities by using the IDirectMusicPort::GetCaps method. If the port does not meet the needs of your application, use the IDirectMusic::EnumPort method to find the Microsoft Software Synthesizer or another port.

[Visual Basic]

A performance uses the default port if –1 is passed as the index parameter to DirectMusicPerformance.SetPort. If you do this, however, you have no way of checking the port's capabilities. If your application needs a port with particular capabilities, examine the ports in the collection created by DirectMusic when the performance is intialized. For more information, see Using Ports.