]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
seq: port-info: rename properties for time stamp
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 14 Jun 2022 10:23:21 +0000 (19:23 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 14 Jun 2022 10:23:21 +0000 (19:23 +0900)
ALSASeq.PortInfo has :timestamp-overwrite and :timestamp-mode.

This commit renames them according to convention. Additionally, property
annotations are added as well.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
samples/seq
src/seq/port-info.c
tests/alsaseq-port-info

index 9d9e847a7ccbfeeec83a2b69f3bd862fa522f550..ddf14e89da4b05e692283edb8d9f5bd45393e526 100755 (executable)
@@ -44,7 +44,7 @@ _, info = client.create_port(info)
 # Dump port information.
 print('The information of port:')
 for prop in ('name', 'midi-channels', 'midi-voices', 'synth-voices',
-             'read-users', 'write-users', 'timestamp-overwrite', 'queue-id'):
+             'read-users', 'write-users', 'tstamp-overwrite', 'queue-id'):
     print('  {}: {}'.format(prop, info.get_property(prop)))
 for prop in ('caps', 'attrs'):
     print('  {}: {}'.format(prop, info.get_property(prop).value_nicks))
index 85b50457f0444660afa433b026d3958226144e81..fe6778b747cba83c8d7d1b68c4b6666543453f32 100644 (file)
@@ -151,34 +151,67 @@ static void alsaseq_port_info_class_init(ALSASeqPortInfoClass *klass)
     gobject_class->set_property = seq_port_info_set_property;
     gobject_class->get_property = seq_port_info_get_property;
 
+    /**
+     * ALSASeqPortInfo:addr:
+     *
+     * The address of port.
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_ADDR] =
         g_param_spec_boxed("addr", "addr",
                            "The address of port.",
                            ALSASEQ_TYPE_ADDR,
                            G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
 
+    /**
+     * ALSASeqPortInfo:name:
+     *
+     * The name of port.
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_NAME] =
         g_param_spec_string("name", "name",
                             "The name of port.",
                             "",
                             G_PARAM_READWRITE);
 
+    /**
+     * ALSASeqPortInfo:caps:
+     *
+     * The capabilities of port, a set of [flags@PortCapFlag].
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_CAPS] =
         g_param_spec_flags("caps", "caps",
-                           "The capabilities of port, a set of "
-                           "ALSASeqPortCapFlag",
+                           "The capabilities of port, a set of ALSASeqPortCapFlag",
                            ALSASEQ_TYPE_PORT_CAP_FLAG,
                            0,
                            G_PARAM_READWRITE);
 
+    /**
+     * ALSASeqPortInfo:attrs:
+     *
+     * The attributes of port, a set of [flags@PortAttrFlag].
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_ATTRS] =
         g_param_spec_flags("attrs", "attrs",
-                           "The attributes of port, a set of "
-                           "ALSASeqPortAttrFlag",
+                           "The attributes of port, a set of ALSASeqPortAttrFlag",
                            ALSASEQ_TYPE_PORT_ATTR_FLAG,
                            0,
                            G_PARAM_READWRITE);
 
+    /**
+     * ALSASeqPortInfo:midi-channels:
+     *
+     * The number of channels per MIDI port.
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_MIDI_CHANNELS] =
         g_param_spec_int("midi-channels", "midi-channels",
                          "The number of channels per MIDI port.",
@@ -186,6 +219,13 @@ static void alsaseq_port_info_class_init(ALSASeqPortInfoClass *klass)
                          0,
                          G_PARAM_READWRITE);
 
+    /**
+     * ALSASeqPortInfo:midi-voices:
+     *
+     * The number of voices per MIDI port.
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_MIDI_VOICES] =
         g_param_spec_int("midi-voices", "midi-voices",
                          "The number of voices per MIDI port",
@@ -193,6 +233,13 @@ static void alsaseq_port_info_class_init(ALSASeqPortInfoClass *klass)
                          0,
                          G_PARAM_READWRITE);
 
+    /**
+     * ALSASeqPortInfo:synth-voices:
+     *
+     * The number of voices per synth port.
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_SYNTH_VOICES] =
         g_param_spec_int("synth-voices", "synth-voices",
                          "The number of voices per synth port",
@@ -200,6 +247,13 @@ static void alsaseq_port_info_class_init(ALSASeqPortInfoClass *klass)
                          0,
                          G_PARAM_READWRITE);
 
+    /**
+     * ALSASeqPortInfo:read-users:
+     *
+     * The current number of subscribers to read.
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_READ_USERS] =
         g_param_spec_int("read-users", "read-users",
                          "The current number of subscribers to read.",
@@ -207,6 +261,13 @@ static void alsaseq_port_info_class_init(ALSASeqPortInfoClass *klass)
                          0,
                          G_PARAM_READABLE);
 
+    /**
+     * ALSASeqPortInfo:write-users:
+     *
+     * The current number of subscribers to write.
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_WRITE_USERS] =
         g_param_spec_int("write-users", "write-users",
                          "The current number of subscribers to write.",
@@ -214,26 +275,49 @@ static void alsaseq_port_info_class_init(ALSASeqPortInfoClass *klass)
                          0,
                          G_PARAM_READABLE);
 
+    /**
+     * ALSASeqPortInfo:tstamp-overwrite:
+     *
+     * The mode whether to overwrite time stamp for event when the event is delivered from the port.
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_TSTAMP_OVERWRITE] =
-        g_param_spec_boolean("timestamp-overwrite", "timestamp-overwrite",
-                             "The mode whether to overwrite timestamp for "
-                             "event when the event is delivered from the port.",
+        g_param_spec_boolean("tstamp-overwrite", "tstamp-overwrite",
+                             "The mode whether to overwrite time stamp for event when the event "
+                             "is delivered from the port.",
                              FALSE,
                              G_PARAM_READWRITE);
 
+    /**
+     * ALSASeqPortInfo:tstamp-mode:
+     *
+     * The mode of time stamp. This is effective when the [property@PortInfo:tstamp-overwrite] is
+     * enabled.
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_TSTAMP_MODE] =
-        g_param_spec_enum("timestamp-mode", "timestamp-mode",
-                          "The type of timestamp. This is effective when the "
-                          "timestamp-overwrite property is enabled.",
+        g_param_spec_enum("tstamp-mode", "tstamp-mode",
+                          "The mode of time stamp. This is effective when the tstamp-overwrite "
+                          "property is enabled.",
                           ALSASEQ_TYPE_EVENT_TSTAMP_MODE,
                           ALSASEQ_EVENT_TSTAMP_MODE_TICK,
                           G_PARAM_READWRITE);
 
+    /**
+     * ALSASeqPortInfo:queue-id:
+     *
+     * The numeric ID of queue to update time stamp when [property@PortInfo:tstamp-overwrite] is
+     * set to True. One of [enum@SpecificQueueId] is available as well.
+     *
+     * Since: 0.3.
+     */
     seq_port_info_props[SEQ_PORT_INFO_PROP_TIME_QUEUE] =
         g_param_spec_uchar("queue-id", "queue-id",
-                           "The numerical ID of queue to update timestamp "
-                           "when timestamp-overwrite property is set to True. "
-                           "One of ALSASeqSpecificQueueId is available as well.",
+                           "The numeric ID of queue to update time stamp when tstamp-overwrite "
+                           "property is set to True.  One of ALSASeqSpecificQueueId is available "
+                          "as well",
                            0, G_MAXUINT8,
                            0,
                            G_PARAM_READWRITE);
index fa0d19e92d7461b6724bb2df81ec1774497e572c..11b26731c9063ef2c474c6e399f69c985a8db662 100644 (file)
@@ -19,8 +19,8 @@ props = (
     'synth-voices',
     'read-users',
     'write-users',
-    'timestamp-overwrite',
-    'timestamp-mode',
+    'tstamp-overwrite',
+    'tstamp-mode',
     'queue-id',
 )
 methods = (