BASS.NET API for the Un4seen BASS Audio Library

BassMidiBASS_MIDI_InInit Method

BASS.NET API for the Un4seen BASS Audio Library
Initializes a MIDI input device.

Namespace:  Un4seen.Bass.AddOn.Midi
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

[DllImportAttribute("bassmidi")]
public static bool BASS_MIDI_InInit(
	int device,
	MIDIINPROC proc,
	IntPtr user
)

Parameters

device
Type: SystemInt32
The device to use... 0 = first. BASS_MIDI_InGetDeviceInfo(Int32, BASS_MIDI_DEVICEINFO) can be used to enumerate the available devices.
proc
Type: Un4seen.Bass.AddOn.MidiMIDIINPROC
Callback delegate to receive MIDI data from the device.
user
Type: SystemIntPtr
User instance data to pass to the callback delegate.

Return Value

Type: Boolean
If the device was successfully initialized, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

This function must be successfully called before using any MIDI input functions.

ERROR CODEDescription
BASS_ERROR_DEVICEThe device number specified is invalid.
BASS_ERROR_ALREADYThe device has already been initialized. You must call BASS_MIDI_InFree(Int32) before you can initialize it again.
BASS_ERROR_NOTAVAILThe device is not available.
BASS_ERROR_UNKNOWNSome other mystery problem!

Platform-specific

MIDI input is not available on Android.

See Also

Reference