Share via


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

Definition

Called whenever the receiver is passed new MIDI data.

[Android.Runtime.Register("onSend", "([BIIJ)V", "GetOnSend_arrayBIIJHandler", ApiSince=23)]
public abstract void OnSend (byte[]? msg, int offset, int count, long timestamp);
[<Android.Runtime.Register("onSend", "([BIIJ)V", "GetOnSend_arrayBIIJHandler", ApiSince=23)>]
abstract member 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 java.lang.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 {link #onSend} method.

Java documentation for android.media.midi.MidiReceiver.onSend(byte[], int, int, long).

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