From 9a3ccf5f3e1ff27f363d636db7463cd176918fe1 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Fri, 11 Mar 2022 16:51:28 -0500 Subject: Implement methods for observer, speaker rotation --- src/spatial.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src') 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; -- cgit v1.2.3