diff options
author | XANTRONIX Development | 2022-02-27 23:41:11 -0500 |
---|---|---|
committer | XANTRONIX Development | 2022-02-27 23:41:36 -0500 |
commit | 9163af15290d67aa50947c116cc09c356dc6985d (patch) | |
tree | 94a858ebc06e2dfe6f8ddaecd8cf4b52465c863a | |
parent | 79d6c75a1324073488a2e34db36ce0afb203537c (diff) | |
download | xas-9163af15290d67aa50947c116cc09c356dc6985d.tar.gz xas-9163af15290d67aa50947c116cc09c356dc6985d.tar.bz2 xas-9163af15290d67aa50947c116cc09c356dc6985d.zip |
Implement xas_spatial_object_start(), stop()
-rw-r--r-- | include/xas/spatial.h | 4 | ||||
-rw-r--r-- | src/spatial.c | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/xas/spatial.h b/include/xas/spatial.h index 5323558..f3314ea 100644 --- a/include/xas/spatial.h +++ b/include/xas/spatial.h @@ -97,6 +97,10 @@ void xas_spatial_scene_position_object(xas_spatial_scene *scene, void xas_spatial_object_get_coord(xas_spatial_object *object, xas_spatial_coord *coord); +int xas_spatial_object_start(xas_spatial_object *object); + +int xas_spatial_object_stop(xas_spatial_object *object); + xas_audio_stream *xas_spatial_scene_new_stream(xas_spatial_scene *scene, size_t buffer_size); diff --git a/src/spatial.c b/src/spatial.c index 98d54aa..9399369 100644 --- a/src/spatial.c +++ b/src/spatial.c @@ -4,6 +4,7 @@ #include <math.h> #include <errno.h> +#include <xas/object.h> #include <xas/spatial.h> static inline float dist(xas_spatial_coord a, xas_spatial_coord b) { @@ -423,6 +424,14 @@ void xas_spatial_object_get_point(xas_spatial_object *object, point->z = object->point.z; } +int xas_spatial_object_start(xas_spatial_object *object) { + return ((xas_object *)object->ctx)->start((xas_object *)object->ctx); +} + +int xas_spatial_object_stop(xas_spatial_object *object) { + return ((xas_object *)object->ctx)->stop((xas_object *)object->ctx); +} + xas_audio_stream *xas_spatial_scene_new_stream(xas_spatial_scene *scene, size_t buffer_size) { return xas_audio_stream_new_source((xas_audio_fill)scene_fill, |