From 5c605932ef699d734daa18b1fde633702dfdc51e Mon Sep 17 00:00:00 2001 From: awtterpip <107778087+awtterpip@users.noreply.github.com> Date: Tue, 7 Feb 2023 09:13:55 -0600 Subject: [PATCH] gave audio interface proper name --- src/core/client.rs | 4 ++-- src/main.rs | 4 ++-- src/nodes/{sound.rs => audio.rs} | 2 +- src/nodes/mod.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/nodes/{sound.rs => audio.rs} (98%) diff --git a/src/core/client.rs b/src/core/client.rs index 835c855..4c9b479 100644 --- a/src/core/client.rs +++ b/src/core/client.rs @@ -2,7 +2,7 @@ use super::scenegraph::Scenegraph; use crate::{ core::{registry::OwnedRegistry, task}, nodes::{ - data, drawable, fields, hmd, input, items, sound, + data, drawable, fields, hmd, input, items, audio, root::Root, spatial, startup::{self, StartupSettings, STARTUP_SETTINGS}, @@ -103,7 +103,7 @@ impl Client { spatial::create_interface(&client)?; fields::create_interface(&client)?; drawable::create_interface(&client)?; - sound::create_interface(&client)?; + audio::create_interface(&client)?; data::create_interface(&client)?; items::create_interface(&client)?; input::create_interface(&client)?; diff --git a/src/main.rs b/src/main.rs index 4ea601a..01c4198 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ mod objects; mod wayland; use crate::core::destroy_queue; -use crate::nodes::{drawable, hmd, input, sound}; +use crate::nodes::{drawable, hmd, input, audio}; use crate::objects::input::mouse_pointer::MousePointer; use crate::objects::input::sk_controller::SkController; use crate::objects::input::sk_hand::SkHand; @@ -207,7 +207,7 @@ fn main() -> Result<()> { }); } drawable::draw(sk); - sound::update(); + audio::update(); #[cfg(feature = "wayland")] wayland.make_context_current(); }, diff --git a/src/nodes/sound.rs b/src/nodes/audio.rs similarity index 98% rename from src/nodes/sound.rs rename to src/nodes/audio.rs index ec1084d..f14f794 100644 --- a/src/nodes/sound.rs +++ b/src/nodes/audio.rs @@ -117,7 +117,7 @@ pub fn create_flex(_node: &Node, calling_client: Arc, data: &[u8]) -> Re resource: ResourceID, } let info: CreateSoundInfo = deserialize(data)?; - let node = Node::create(&calling_client, "/audio/sounds", info.name, true); + let node = Node::create(&calling_client, "/audio/sound", info.name, true); let parent = find_spatial_parent(&calling_client, info.parent_path)?; let transform = parse_transform(info.transform, true, true, true); let node = node.add_to_scenegraph()?; diff --git a/src/nodes/mod.rs b/src/nodes/mod.rs index bd830e7..0ff9e46 100644 --- a/src/nodes/mod.rs +++ b/src/nodes/mod.rs @@ -8,7 +8,7 @@ pub mod items; pub mod root; pub mod spatial; pub mod startup; -pub mod sound; +pub mod audio; use color_eyre::eyre::{eyre, Result}; use nanoid::nanoid; @@ -39,7 +39,7 @@ use self::drawable::text::Text; use self::fields::Field; use self::input::{InputHandler, InputMethod}; use self::items::{Item, ItemAcceptor, ItemUI}; -use self::sound::Sound; +use self::audio::Sound; use self::spatial::zone::Zone; use self::spatial::Spatial; use self::startup::StartupSettings;