summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/xas/spatial.h4
-rw-r--r--src/spatial.c9
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,