Struct

ALSASeqEvent

Description [src]

struct ALSASeqEvent {
  /* No available fields */
}

A boxed structure for sequencer event. A ALSASeqEvent expresses any type of event in ALSA Sequencer. The event consists of some product-type propertiess and two variant-type properties.

The instance should be released by call of g_boxed_free() since it can point to the other allocated object for blob data, therefore it’s preferable to use g_boxed_copy() to duplicate the instance so that the blob data is going to be duplicated as well.

This is the list of product-type properties:

  • the type of event
  • the mode of time stamp
  • the mode of time
  • the mode of length
  • the mode of priority
  • the numeric value of tag associated to the event
  • the numeric identifier of queue to schedule the event
  • destination address
  • source address

One of variant-type property is for time stamp.

  • tick count as time stamp of event
  • real time as time stamp of event

Another variant-type property is for data of event.

  • note
  • control
  • 12 bytes
  • 3 quadlets
  • blob as variable length of bytes
  • pointer in VMA of user process
  • queue control
  • tick count as arbitrary time stamp
  • real time as arbitrary time stamp
  • arbitrary address
  • connection between source and destination addresses
  • result

The type of time stamp is associated to the mode of time stamp, while the type of data is associated to the type of event loosely. Each of the variant type property has single storage internally, thus an event can includes the sole variant.

The object wraps struct snd_seq_event in UAPI of Linux sound subsystem.

Constructors

alsaseq_event_new

Allocate and return an instance of ALSASeqEvent.

Instance methods

alsaseq_event_calculate_pool_consumption

Calculate the number of cells in client pool to be consumed when the event is delivered. The comparison to properties of ALSASeqClientPool is useful when scheduling the event.

alsaseq_event_get_addr_data

Get the address data of event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_blob_data

Refer to the blob data, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_byte_data

Get the byte data, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_connect_data

Get the connect data of event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_ctl_data

Refer to the control data, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_destination

Refer to the destination address of event.

alsaseq_event_get_event_type

Get the type of event.

alsaseq_event_get_length_mode

Get the mode of data length for the event.

alsaseq_event_get_note_data

Refer to the note data, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_pointer_data

Get the pointer and length in data of event. It has no gurantee that the dereference of pointer is safe in VMA of user process, thus users have to know the purpose of the pointer in advance; e.g. inter-process communication between forked parent and child processes.

alsaseq_event_get_priority_mode

Get the mode of priority for the event.

alsaseq_event_get_quadlet_data

Get the quadlet data of event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_queue_data

Get the queue data of event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_queue_id

Get the numeric identifier of queue to schedule the event.

alsaseq_event_get_real_time

Copy the real time to the event, available only when ALSASeqEventTstampMode.REAL is retrieved by alsaseq_event_get_tstamp_mode().

alsaseq_event_get_real_time_data

Get the real time data of event, available when [method@Event.get_tstamp_mode is ALSASeqEventTstampMode.REAL and alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_result_data

Get the result data of event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_source

Refer to the source address of event.

alsaseq_event_get_tag

Get the numeric value of tag associated to the event.

alsaseq_event_get_tick_time

Get the tick time of event, available only when ALSASeqEventTstampMode.TICK is retrieved by alsaseq_event_get_tstamp_mode().

alsaseq_event_get_tick_time_data

Get the tick time data of event, available when [method@Event.get_tstamp_mode is ALSASeqEventTstampMode.TICK and alsaseq_event_get_event_type() results in one of:

alsaseq_event_get_time_mode

Get the mode of time for the event.

alsaseq_event_get_tstamp_mode

Get the mode of time stamp for the event.

alsaseq_event_set_addr_data

Get the address data of event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_blob_data

Copy the quadlet data to the event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_byte_data

Copy the byte data, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_connect_data

Copy the connect data to the event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_ctl_data

Copy the control data, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_destination

Copy the address as destination of event.

alsaseq_event_set_note_data

Copy the note data, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_pointer_data

Copy the pointer and length to data of event. When using the type, the event should be deliverd directly without scheduling to queue. The aim of data pointed by it is arbitrary, thus programmer needs to decide protocol between transmitter and receiver in advance.

alsaseq_event_set_priority_mode

Set the mode of priority for the event.

alsaseq_event_set_quadlet_data

Copy the quadlet data to the event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_queue_data

Copy the queue data to the event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_queue_id

Set the numeric identifier of queue to schedule the event.

alsaseq_event_set_real_time

Copy the real time to the event and set ALSASeqEventTstampMode.REAL.

alsaseq_event_set_real_time_data

Copy the real time data to the event, available [method@Event.get_tstamp_mode is ALSASeqEventTstampMode.REAL and alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_result_data

Copy the result data to the event, available when alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_source

Copy the address as source of event.

alsaseq_event_set_tag

Set the numeric value of tag associated to the event.

alsaseq_event_set_tick_time

Copy the real time to the event and set ALSASeqEventTstampMode.TICK.

alsaseq_event_set_tick_time_data

Copy the tick time data to the event, available when [method@Event.get_tstamp_mode is ALSASeqEventTstampMode.TICK and alsaseq_event_get_event_type() results in one of:

alsaseq_event_set_time_mode

Set the mode of time for the event.