From c37b073de965d23a172a5364af5e541d9738b12b Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Wed, 16 Mar 2022 01:37:23 -0400 Subject: Add index argument to xas_object_start(), stop() Changes: * Refactor all start, stop dispatch methods to accept an index argument, whether it is used or not * Use 'index' slot of xas_seq_event to store index to pass to xas_object_start(), xas_object_stop() for start and stop events --- include/xas/object.h | 8 ++++---- include/xas/seq.h | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/xas/object.h b/include/xas/object.h index 5780c7d..1fd3b8c 100644 --- a/include/xas/object.h +++ b/include/xas/object.h @@ -5,9 +5,9 @@ typedef struct _xas_object xas_object; -typedef int (*xas_object_start_callback)(xas_object *object); +typedef int (*xas_object_start_callback)(xas_object *object, size_t index); -typedef int (*xas_object_stop_callback)(xas_object *object); +typedef int (*xas_object_stop_callback)(xas_object *object, size_t index); typedef int (*xas_object_set_gain_callback)(xas_object *object, float gain); @@ -34,9 +34,9 @@ struct _xas_object { void xas_object_init(xas_object *object); -int xas_object_start(xas_object *object); +int xas_object_start(xas_object *object, size_t index); -int xas_object_stop(xas_object *object); +int xas_object_stop(xas_object *object, size_t index); int xas_object_set_gain(xas_object *object, float gain); diff --git a/include/xas/seq.h b/include/xas/seq.h index 887276b..05b1919 100644 --- a/include/xas/seq.h +++ b/include/xas/seq.h @@ -62,11 +62,13 @@ void xas_seq_destroy(xas_seq *seq); int xas_seq_add_event_off(xas_seq *seq, xas_spatial_object *object, - struct timeval timestamp); + struct timeval timestamp, + size_t index); int xas_seq_add_event_on(xas_seq *seq, xas_spatial_object *object, - struct timeval timestamp); + struct timeval timestamp, + size_t index); int xas_seq_add_set_position(xas_seq *seq, xas_spatial_object *object, -- cgit v1.2.3