summaryrefslogtreecommitdiffstats
path: root/src/spatial.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/spatial.c')
-rw-r--r--src/spatial.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/spatial.c b/src/spatial.c
index f4f6b70..bba5ace 100644
--- a/src/spatial.c
+++ b/src/spatial.c
@@ -211,11 +211,25 @@ void xas_spatial_scene_set_observer(xas_spatial_scene *scene,
scene->observer.width = width;
}
+static void object_position(xas_spatial_scene *scene,
+ xas_spatial_object *object,
+ xas_spatial_coord coord);
+
void xas_spatial_scene_set_speaker_coords(xas_spatial_scene *scene,
xas_spatial_coord speaker_l,
xas_spatial_coord speaker_r) {
+ xas_spatial_object *obj = scene->first;
+
scene->speaker_l = speaker_l;
scene->speaker_r = speaker_r;
+
+ while (obj) {
+ xas_spatial_object *next = obj->next;
+
+ object_position(scene, obj, obj->coord);
+
+ obj = next;
+ }
}
int xas_spatial_scene_set_speed(xas_spatial_scene *scene, float speed) {