diff options
-rw-r--r-- | include/xas/spatial.h | 9 | ||||
-rw-r--r-- | src/spatial.c | 18 |
2 files changed, 27 insertions, 0 deletions
diff --git a/include/xas/spatial.h b/include/xas/spatial.h index af10ef4..00cf8ff 100644 --- a/include/xas/spatial.h +++ b/include/xas/spatial.h @@ -89,10 +89,19 @@ void xas_spatial_scene_set_observer(xas_spatial_scene *scene, xas_spatial_coord rotation, float width); +void xas_spatial_scene_position_observer(xas_spatial_scene *scene, + xas_spatial_coord point); + +void xas_spatial_scene_rotate_observer(xas_spatial_scene *scene, + xas_spatial_coord rotation); + void xas_spatial_scene_set_speaker_coords(xas_spatial_scene *scene, xas_spatial_coord speaker_l, xas_spatial_coord speaker_r); +void xas_spatial_scene_rotate_speakers(xas_spatial_scene *scene, + xas_spatial_coord rotation); + int xas_spatial_scene_set_speed(xas_spatial_scene *scene, float speed); int xas_spatial_scene_set_radius(xas_spatial_scene *scene, float radius); diff --git a/src/spatial.c b/src/spatial.c index fc13a53..1da1bdc 100644 --- a/src/spatial.c +++ b/src/spatial.c @@ -412,6 +412,16 @@ void xas_spatial_scene_set_observer(xas_spatial_scene *scene, scene->observer.width = width; } +void xas_spatial_scene_position_observer(xas_spatial_scene *scene, + xas_spatial_coord point) { + scene->observer.point = point; +} + +void xas_spatial_scene_rotate_observer(xas_spatial_scene *scene, + xas_spatial_coord rotation) { + scene->observer.rotation = rotation; +} + void xas_spatial_scene_set_speaker_coords(xas_spatial_scene *scene, xas_spatial_coord speaker_l, xas_spatial_coord speaker_r) { @@ -421,6 +431,14 @@ void xas_spatial_scene_set_speaker_coords(xas_spatial_scene *scene, object_update_delays(scene); } +void xas_spatial_scene_rotate_speakers(xas_spatial_scene *scene, + xas_spatial_coord rotation) { + rotate(rotation, &scene->speaker_l); + rotate(rotation, &scene->speaker_r); + + object_update_delays(scene); +} + int xas_spatial_scene_set_speed(xas_spatial_scene *scene, float speed) { scene->speed = speed; |