Assembly: Bass.Net (in Bass.Net.dll) Version: 126.96.36.199
public static int BASS_MIDI_StreamEvents( int handle, BASSMIDIEventMode flags, BASS_MIDI_EVENT events )
Public Shared Function BASS_MIDI_StreamEvents ( handle As Integer, flags As BASSMIDIEventMode, events As BASS_MIDI_EVENT() ) As Integer
- Type: SystemInt32
The MIDI stream to apply the events to (as returned by BASS_MIDI_StreamCreate(Int32, BASSFlag, Int32)).
- Type: Un4seen.Bass.AddOn.MidiBASSMIDIEventMode
BASS_MIDI_EVENTS_STRUCT, with optional flags (see BASSMIDIEventMode):
BASS_MIDI_EVENTS_RAW Raw MIDI event data, as would be sent to a MIDI device. Running status is supported. To overcome the 16 channel limit, the event data's channel information can optionally be overridden by adding the new channel number to this parameter, where +1 = the 1st channel. BASS_MIDI_EVENTS_STRUCT An array of BASS_MIDI_EVENT structures. BASS_MIDI_EVENTS_NORSTATUS Flag: Disable running status, meaning each event must include a status byte. Only applicable with BASS_MIDI_EVENTS_RAW. BASS_MIDI_EVENTS_SYNC Flag: Trigger BASS_SYNC_MIDI_xxx syncs for the processed events (see BASS_ChannelSetSync(Int32, BASSSync, Int64, SYNCPROC, IntPtr)).
- Type: Un4seen.Bass.AddOn.MidiBASS_MIDI_EVENT
The event data (an array of BASS_MIDI_EVENT structures).
Return ValueType: Int32
If successful, the number of events processed is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
Events applied to a MIDI file stream can subsequently be overridden by events in the file itself, and will also be overridden when seeking or looping. That can be avoided by using additional channels, allocated via the BASS_ATTRIB_MIDI_CHANS attribute.
If the MIDI stream is being played (it's not a decoding channel), then there will be some delay in the effect of the event being heard. This latency can be reduced by making use of the BASS_CONFIG_BUFFER and BASS_CONFIG_UPDATEPERIOD config options when creating the stream.
|BASS_ERROR_HANDLE||handle is not valid.|
|BASS_ERROR_ILLPARAM||flags is not valid.|