BASS.NET API for the Un4seen BASS Audio Library

MidiOutputDeviceGetMidiPorts Method

BASS.NET API for the Un4seen BASS Audio Library
Returns all available Midi output port IDs.

Namespace:  radio42.Multimedia.Midi
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public static int[] GetMidiPorts()

Return Value

Type: Int32
An array of int representing the available Midi port IDs.
Remarks

The values returned equals the deviceID, which might be used with the constructor of this class.

This method returns all available deviceIDs representing a Midi output port. You might use each ID with the GetDeviceDescription(Int32) method to retrieve the name of the respective Midi output device.

Examples

List all Midi output ports (devices which might be used with this class):
int[] outPorts = MidiOutputDevice.GetMidiPorts();
foreach (int port in outPorts)
{
  string name = MidiOutputDevice.GetDeviceDescription(port);
  Console.WriteLine("{0}={1}", port, name);
}
See Also

Reference