From 72d8062b80ff6ad0e01b9be4baa8a044c615bb0e Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Mon, 13 Apr 2020 15:34:39 +0900 Subject: [PATCH] seq: tstamp: rename argument for real time This commit renames argument for real time so that the name is consistent within the library. Signed-off-by: Takashi Sakamoto --- src/seq/tstamp.c | 18 +++++++++--------- src/seq/tstamp.h | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/seq/tstamp.c b/src/seq/tstamp.c index 788c5df..c749749 100644 --- a/src/seq/tstamp.c +++ b/src/seq/tstamp.c @@ -35,29 +35,29 @@ void alsaseq_tstamp_set_tick_time(ALSASeqTstamp *self, const guint32 tick_time) /** * alsaseq_tstamp_get_real_time: * @self: A #ALSASeqTstamp. - * @tstamp: (array fixed-size=2)(out)(transfer none): The array with two - * elements for sec part and nsec part of real time. + * @real_time: (array fixed-size=2)(out)(transfer none): The array with two + * elements for sec part and nsec part of real time. * * Refer to the time as wall-clock time. */ -void alsaseq_tstamp_get_real_time(ALSASeqTstamp *self, const guint32 **tstamp) +void alsaseq_tstamp_get_real_time(ALSASeqTstamp *self, guint32 *real_time[2]) { // MEMO: I wish 32-bit storage size is aligned to 32 bit offset in all of // supported ABIs. - *tstamp = (guint32 *)&self->tstamp.time; + *real_time = (guint32 *)&self->tstamp.time; } /** * alsaseq_tstamp_set_real_time: * @self: A #ALSASeqTstamp. - * @tstamp: (array fixed-size=2)(transfer none): The array with two elements for - * sec part and nsec part of real time. + * @real_time: (array fixed-size=2)(transfer none): The array with two elements + * for sec part and nsec part of real time. * * Copy the time as wall-clock time. */ -void alsaseq_tstamp_set_real_time(ALSASeqTstamp *self, const guint32 tstamp[2]) +void alsaseq_tstamp_set_real_time(ALSASeqTstamp *self, const guint32 real_time[2]) { - self->tstamp.time.tv_sec = tstamp[0]; - self->tstamp.time.tv_nsec = tstamp[1]; + self->tstamp.time.tv_sec = real_time[0]; + self->tstamp.time.tv_nsec = real_time[1]; } diff --git a/src/seq/tstamp.h b/src/seq/tstamp.h index d51e278..5678b4e 100644 --- a/src/seq/tstamp.h +++ b/src/seq/tstamp.h @@ -14,7 +14,7 @@ G_BEGIN_DECLS // The usage of union is inconvenient to some programming languages which has // no support to handle it. Let's use wrapper structure. typedef struct { - union snd_seq_timestamp time; + union snd_seq_timestamp tstamp; } ALSASeqTstamp; GType alsaseq_tstamp_get_type() G_GNUC_CONST; @@ -22,8 +22,8 @@ GType alsaseq_tstamp_get_type() G_GNUC_CONST; void alsaseq_tstamp_get_tick_time(ALSASeqTstamp *self, guint32 *tick_time); void alsaseq_tstamp_set_tick_time(ALSASeqTstamp *self, const guint32 tick_time); -void alsaseq_tstamp_get_real_time(ALSASeqTstamp *self, const guint32 **tstamp); -void alsaseq_tstamp_set_real_time(ALSASeqTstamp *self, const guint32 tstamp[2]); +void alsaseq_tstamp_get_real_time(ALSASeqTstamp *self, guint32 *real_time[2]); +void alsaseq_tstamp_set_real_time(ALSASeqTstamp *self, const guint32 real_time[2]); G_END_DECLS -- 2.47.3