alsa-project/alsa-gobject pull request #14 was opened from takaswie:
In ALSA Sequencer, queue is an important element to dispatch scheduled events. Without queue, any events are going to be dispatched immediately and this mode is already supported.
This patchset is to support queue operations and complete development for ALSASeq.
The information of queue is represented by ALSASeq.QueueInfo GObject-derived object. Several APIs are added to ALSASeq.UserClient to maintain lifetime of queue:
- ALSASeq.UserClient.create_queue() - ALSASeq.UserClient.delete_queue() - ALSASeq.UserClient.update_queue()
The maintenance of actual queue behaviour can be already done by scheduling events with ALSASeq.EventDataQueue with appropriate event type.
The status and tempo of queue to dispatch scheduled events is repsented by ALSASeq.QueueStatus and ALSASeq.QueueTempo. Some APIs are added to ALSASeq.UserClient to retrieve them:
- ALSASeq.UserClient.set_queue_tempo() - ALSASeq.UserClient.get_queue_tempo() - ALSASeq.UserClient.set_queue_timer() - ALSASeq.UserClient.get_queue_timer()
The registered queues can be reserved. Some APIs are added to ALSASeq.UserClient for the reservation:
- ALSASeq.UserClient.get_queue_usage() - ALSASeq.UserClient.set_queue_usage()
The queue is assigned to an instance of ALSA Timer device, practically. In this case, global system timer device is used according to parameters of snd_seq kernel module as a default. This global system timer is based on Linux timer wheel. The assignment is represented by subclasses of ALSASeq.QueueTimer and ALSASeq.QueueTimerALSA is currently available. Two APIs are added to ALSASeq.UserClient for the assignment:
- ALSASeq.UserClient.set_queue_timer() - ALSASeq.UserClient.get_queue_timer()
Finally, the scheduled events can be removed from the queues. The batch of target events is represented by ALSASeq.RemoveFilter and ALSASeq.UserClient.remove_events() is available for the removal.
Request URL : https://github.com/alsa-project/alsa-gobject/pull/14 Patch URL : https://github.com/alsa-project/alsa-gobject/pull/14.patch Repository URL: https://github.com/alsa-project/alsa-gobject