Language

MidiInputPort.OnSend(Byte[], Int32, Int32, Int64) Method

Definition

Called whenever the receiver is passed new MIDI data.

[Android.Runtime.Register("onSend", "([BIIJ)V", "", ApiSince=23)]
public override void OnSend(byte[]? msg, int offset, int count, long timestamp);
[<Android.Runtime.Register("onSend", "([BIIJ)V", "", ApiSince=23)>]
override this.OnSend : byte[] * int * int * int64 -> unit

Parameters

msg
Byte[]

a byte array containing the MIDI data

offset
Int32

the offset of the first byte of the data in the array to be processed

count
Int32

the number of bytes of MIDI data in the array to be processed

timestamp
Int64

the timestamp of the message (based on System.nanoTime()

Attributes

Remarks

Called whenever the receiver is passed new MIDI data. Subclasses override this method to receive MIDI data. May fail if count exceeds getMaxMessageSize(). NOTE: the msg array parameter is only valid within the context of this call. The msg bytes should be copied by the receiver rather than retaining a reference to this parameter. Also, modifying the contents of the msg array parameter may result in other receivers in the same application receiving incorrect values in their onSend method.

Android reference for android.media.midi.MidiInputPort.onSend.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to