From 7fa5732cfb273056d72ee23449bdc317a1a310a8 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Wed, 16 Mar 2022 02:06:58 -0400 Subject: Add index argument to bank entry change events --- include/xas/object.h | 6 ++++-- include/xas/seq.h | 14 ++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/xas/object.h b/include/xas/object.h index 1fd3b8c..4d5b754 100644 --- a/include/xas/object.h +++ b/include/xas/object.h @@ -13,7 +13,9 @@ typedef int (*xas_object_set_gain_callback)(xas_object *object, float gain); typedef int (*xas_object_set_freq_callback)(xas_object *object, size_t freq); -typedef int (*xas_object_set_entry_callback)(xas_object *object, size_t entry); +typedef int (*xas_object_set_entry_callback)(xas_object *object, + size_t index, + size_t entry); typedef int (*xas_object_set_flags_callback)(xas_object *object, int flags); @@ -40,7 +42,7 @@ int xas_object_stop(xas_object *object, size_t index); int xas_object_set_gain(xas_object *object, float gain); -int xas_object_set_entry(xas_object *object, size_t entry); +int xas_object_set_entry(xas_object *object, size_t index, size_t entry); int xas_object_set_freq(xas_object *object, size_t freq); diff --git a/include/xas/seq.h b/include/xas/seq.h index 05b1919..38b7cf4 100644 --- a/include/xas/seq.h +++ b/include/xas/seq.h @@ -15,7 +15,7 @@ enum xas_seq_event_type { XAS_SEQ_EVENT_SET_GAIN, XAS_SEQ_EVENT_SET_FREQUENCY, XAS_SEQ_EVENT_SET_SYNTH_TYPE, - XAS_SEQ_EVENT_SET_BANK_INDEX, + XAS_SEQ_EVENT_SET_BANK_ENTRY, XAS_SEQ_EVENT_SET_PLAYER_FLAGS, XAS_SEQ_EVENT_SPEECH, XAS_SEQ_EVENT_OFF, @@ -31,6 +31,7 @@ struct _xas_seq_event { xas_spatial_object *object; struct timeval timestamp; + size_t index; union { xas_spatial_coord point; @@ -38,7 +39,7 @@ struct _xas_seq_event { float speed; float gain; int flags; - size_t index; + size_t entry; size_t frequency; enum xas_synth_type synth_type; const char *phrase; @@ -90,10 +91,11 @@ int xas_seq_add_set_gain(xas_seq *seq, struct timeval timestamp, float gain); -int xas_seq_add_set_bank(xas_seq *seq, - xas_spatial_object *object, - struct timeval timestamp, - size_t index); +int xas_seq_add_set_bank_entry(xas_seq *seq, + xas_spatial_object *object, + struct timeval timestamp, + size_t index, + size_t entry); int xas_seq_add_set_player_flags(xas_seq *seq, xas_spatial_object *object, -- cgit v1.2.3