From 9163af15290d67aa50947c116cc09c356dc6985d Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sun, 27 Feb 2022 23:41:11 -0500 Subject: Implement xas_spatial_object_start(), stop() --- include/xas/spatial.h | 4 ++++ src/spatial.c | 9 +++++++++ 2 files changed, 13 insertions(+) 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 #include +#include #include 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, -- cgit v1.2.3