All of lore.kernel.org
 help / color / mirror / Atom feed
* alsa-gobject: Add shared library to operate ALSA rawmidi character device
       [not found] <1586433493470645905-webhooks-bot@alsa-project.org>
@ 2020-04-09 11:58 ` GitHub pull_request - opened
  0 siblings, 0 replies; only message in thread
From: GitHub pull_request - opened @ 2020-04-09 11:58 UTC (permalink / raw)
  To: alsa-devel

alsa-project/alsa-gobject pull request #16 was opened from takaswie:

This patchset is to add a new library, libalsarawmidi, to operate ALSA rawmidi
character device. This library is compatible with GObject Introspection.

ALSA rawmidi interface is designed to transfer MIDI messages. Userspace
application operate ALSA rawmidi character device for incoming/outgoing
transmission. The transmission line is abstracted as substream. One
character device is associated to several substreams. The application can
indicate subdevice to select a substream or a pair of substreams from them.

The library has ALSARawmidi.StreamPair to operate the character device.
Userspace application call ALSARawmidi.StreamPair.open() to open the chracter
device, select subdevice and attach the substreams to the device. After the
call, data transmission already starts. The application can call
ALSARawmidi.StreamPair.write_to_substream() to transfer MIDI message bytes.

The application can also call ALSARawmidi.StreamPair.read_from_substream()
to receive MIDI message bytes, but this call can be blocked till any
messages are actually received and available as a default. For polling,
GSource which ALSARawmidi.StreamPair.create_source() returns is useful.
The application can use it for GMainContext/GMainLoop. When any message
is available, ALSARawmidi.StreamPair emits 'handle-messages' GObject signal.
The application register its handler to the signal in advance, then
process the messages.

ALSARawmidi.StreamPair has the other methods to drain/drop running
substream:
 - ALSARawmidi.StreamPair.drain_substream() 
 - ALSARawmidi.StreamPair.drop_substream() 

ALSARawmidi.StreamPair has more methods to return GObject-derived objects
for information/status/parameters of substream:
 - ALSARawmidi.StreamPair.get_substream_info()
 - ALSARawmidi.StreamPair.get_substream_status() 
 - ALSARawmidi.StreamPair.set_substream_params() 

The library includes global method to query information about rawmidi:
 - ALSARawmidi.get_rawmidi_sysname()
 - ALSARawmidi.get_rawmidi_devnode()
 - ALSARawmidi.get_device_id_list()
 - ALSARawmidi.get_subdevice_id_list()
 - ALSARawmidi.get_substream_info()

Request URL   : https://github.com/alsa-project/alsa-gobject/pull/16
Patch URL     : https://github.com/alsa-project/alsa-gobject/pull/16.patch
Repository URL: https://github.com/alsa-project/alsa-gobject

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-09 11:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1586433493470645905-webhooks-bot@alsa-project.org>
2020-04-09 11:58 ` alsa-gobject: Add shared library to operate ALSA rawmidi character device GitHub pull_request - opened

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.