Documentation
¶
Overview ¶
Package midi provides Go bindings for Android MIDI.
Index ¶
- type Device
- func (h *Device) Close() error
- func (h *Device) GetType() error
- func (h *Device) NumInputPorts() int64
- func (h *Device) NumOutputPorts() int64
- func (h *Device) OpenInputPort(portNumber int32) (*InputPort, error)
- func (h *Device) OpenOutputPort(portNumber int32) (*OutputPort, error)
- func (h *Device) Pointer() unsafe.Pointer
- type Error
- type InputPort
- type MIDI_DEVICE_TYPE
- type MIDI_OPCODE
- type Media_status_t
- type MidiDevice_Protocol
- type OutputPort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device wraps the NDK AMidiDevice handle.
func NewDeviceFromPointer ¶
NewDeviceFromPointer wraps a raw AMidiDevice pointer.
func (*Device) NumInputPorts ¶
NumInputPorts returns the value directly.
func (*Device) NumOutputPorts ¶
NumOutputPorts returns the value directly.
func (*Device) OpenInputPort ¶
OpenInputPort creates a new InputPort from this Device.
func (*Device) OpenOutputPort ¶
func (h *Device) OpenOutputPort(portNumber int32) (*OutputPort, error)
OpenOutputPort creates a new OutputPort from this Device.
type InputPort ¶
type InputPort struct {
// contains filtered or unexported fields
}
InputPort wraps the NDK AMidiInputPort handle.
func NewInputPortFromPointer ¶
NewInputPortFromPointer wraps a raw AMidiInputPort pointer.
type MIDI_DEVICE_TYPE ¶
type MIDI_DEVICE_TYPE int32
const ( AMIDI_DEVICE_TYPE_USB MIDI_DEVICE_TYPE = 1 AMIDI_DEVICE_TYPE_VIRTUAL MIDI_DEVICE_TYPE = 2 AMIDI_DEVICE_TYPE_BLUETOOTH MIDI_DEVICE_TYPE = 3 )
type MIDI_OPCODE ¶
type MIDI_OPCODE int32
const ( AMIDI_OPCODE_DATA MIDI_OPCODE = 1 AMIDI_OPCODE_FLUSH MIDI_OPCODE = 2 )
type Media_status_t ¶
type Media_status_t = capi.Media_status_t
type MidiDevice_Protocol ¶
type MidiDevice_Protocol int32
const ( AMIDI_DEVICE_PROTOCOL_UMP_USE_MIDI_CI MidiDevice_Protocol = 0 AMIDI_DEVICE_PROTOCOL_UMP_MIDI_1_0_UP_TO_64_BITS MidiDevice_Protocol = 1 AMIDI_DEVICE_PROTOCOL_UMP_MIDI_1_0_UP_TO_64_BITS_AND_JRTS MidiDevice_Protocol = 2 AMIDI_DEVICE_PROTOCOL_UMP_MIDI_1_0_UP_TO_128_BITS MidiDevice_Protocol = 3 AMIDI_DEVICE_PROTOCOL_UMP_MIDI_1_0_UP_TO_128_BITS_AND_JRTS MidiDevice_Protocol = 4 AMIDI_DEVICE_PROTOCOL_UMP_MIDI_2_0 MidiDevice_Protocol = 17 AMIDI_DEVICE_PROTOCOL_UMP_MIDI_2_0_AND_JRTS MidiDevice_Protocol = 18 AMIDI_DEVICE_PROTOCOL_UNKNOWN MidiDevice_Protocol = -1 )
type OutputPort ¶
type OutputPort struct {
// contains filtered or unexported fields
}
OutputPort wraps the NDK AMidiOutputPort handle.
func NewOutputPortFromPointer ¶
func NewOutputPortFromPointer(ptr unsafe.Pointer) *OutputPort
NewOutputPortFromPointer wraps a raw AMidiOutputPort pointer.
func (*OutputPort) Close ¶
func (h *OutputPort) Close() error
Close releases the underlying NDK handle.
func (*OutputPort) Pointer ¶
func (h *OutputPort) Pointer() unsafe.Pointer
Pointer returns the underlying pointer as unsafe.Pointer.