diff options
author | XANTRONIX Development | 2022-02-28 13:15:26 -0500 |
---|---|---|
committer | XANTRONIX Development | 2022-02-28 13:15:26 -0500 |
commit | 4be4c6eca7e6eea0aea35aa069b2614000b777f7 (patch) | |
tree | 6a043d9a6445364641d5ea290bf25bf7577037d6 /include | |
parent | e3117bdba5a7e7531ba06c8dcbcc893d184a16e0 (diff) | |
download | xas-4be4c6eca7e6eea0aea35aa069b2614000b777f7.tar.gz xas-4be4c6eca7e6eea0aea35aa069b2614000b777f7.tar.bz2 xas-4be4c6eca7e6eea0aea35aa069b2614000b777f7.zip |
Initial stab at script playback
Diffstat (limited to 'include')
-rw-r--r-- | include/xas/script.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/include/xas/script.h b/include/xas/script.h index 102d421..5f0af87 100644 --- a/include/xas/script.h +++ b/include/xas/script.h @@ -5,9 +5,6 @@ #include <sys/time.h> #include <xas/audio.h> -#include <xas/vox.h> -#include <xas/bank.h> -#include <xas/synth.h> #include <xas/spatial.h> enum xas_script_event_type { @@ -15,14 +12,22 @@ enum xas_script_event_type { XAS_SCRIPT_EVENT_ON, XAS_SCRIPT_EVENT_SET_POSITION, XAS_SCRIPT_EVENT_SET_GAIN, - XAS_SCRIPT_EVENT_SET_BANK_INDEX, - XAS_SCRIPT_EVENT_SET_FREQUENCY + XAS_SCRIPT_EVENT_SET_FREQUENCY, + XAS_SCRIPT_EVENT_SET_BANK_INDEX +}; + +enum xas_script_object_type { + XAS_SCRIPT_OBJECT_ANY, + XAS_SCRIPT_OBJECT_SYNTH, + XAS_SCRIPT_OBJECT_VOX, + XAS_SCRIPT_OBJECT_BANK_PLAYER }; typedef struct _xas_script_event xas_script_event; struct _xas_script_event { enum xas_script_event_type type; + enum xas_script_object_type objtype; xas_spatial_object *object; @@ -43,10 +48,7 @@ typedef struct _xas_script { xas_script_event *first; - struct timeval timestamp; - - size_t buffer_size, - current_index; + size_t buffer_size; } xas_script; xas_script *xas_script_new(xas_spatial_scene *scene, size_t buffer_size); @@ -61,22 +63,22 @@ int xas_script_add_event_on(xas_script *script, xas_spatial_object *object, struct timeval timestamp); -int xas_script_add_position_set(xas_script *script, +int xas_script_add_set_position(xas_script *script, xas_spatial_object *object, struct timeval timestamp, xas_spatial_coord point); -int xas_script_add_gain_set(xas_script *script, +int xas_script_add_set_gain(xas_script *script, xas_spatial_object *object, struct timeval timestamp, float gain); -int xas_script_add_bank_set(xas_script *script, +int xas_script_add_set_bank(xas_script *script, xas_spatial_object *object, struct timeval timestamp, size_t index); -int xas_script_add_frequency_set(xas_script *script, +int xas_script_add_set_frequency(xas_script *script, xas_spatial_object *object, struct timeval timestamp, size_t frequency); |