Added in API level 23

MidiInputPort


class MidiInputPort : MidiReceiver, Closeable
kotlin.Any
   ↳ android.media.midi.MidiReceiver
   ↳ android.media.midi.MidiInputPort

This class is used for sending data to a port on a MIDI device

Summary

Public methods
Unit

Int

Returns the port number of this port

Unit

Unit
onSend(msg: ByteArray!, offset: Int, count: Int, timestamp: Long)

Protected methods
Unit

Inherited functions

Public methods

close

Added in API level 23
fun close(): Unit
Exceptions
java.lang.Exception if this resource cannot be closed
java.io.IOException if an I/O error occurs

getPortNumber

Added in API level 23
fun getPortNumber(): Int

Returns the port number of this port

Return
Int the port's port number

onFlush

Added in API level 23
fun onFlush(): Unit
Exceptions
java.io.IOException

onSend

Added in API level 23
fun onSend(
    msg: ByteArray!,
    offset: Int,
    count: Int,
    timestamp: Long
): Unit
Parameters
msg ByteArray!: a byte array containing the MIDI data
offset Int: the offset of the first byte of the data in the array to be processed
count Int: the number of bytes of MIDI data in the array to be processed
timestamp Long: the timestamp of the message (based on java.lang.System#nanoTime
Exceptions
java.io.IOException

Protected methods

finalize

Added in API level 23
protected fun finalize(): Unit
Exceptions
java.lang.Throwable the Exception raised by this method