diff --git a/Cargo.toml b/Cargo.toml index 4132153..2724111 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,6 @@ comet_ecs = { path = "./crates/comet_ecs", workspace = true } comet_input = { path = "./crates/comet_input", workspace = true } comet_log = { path = "./crates/comet_log", workspace = true } comet_structs = { path = "./crates/comet_structs", workspace = true } -comet_sound = { path = "./crates/comet_sound", workspace = true } cfg-if = "1" anyhow = "1.0" @@ -63,5 +62,4 @@ comet_resources = { path = "./crates/comet_resources", workspace = true } comet_ecs = { path = "./crates/comet_ecs", workspace = true } comet_input = { path = "./crates/comet_input", workspace = true } comet_log = { path = "./crates/comet_log", workspace = true } -comet_structs = { path = "./crates/comet_structs", workspace = true } -comet_sound = { path = "./crates/comet_sound", workspace = true } +comet_structs = { path = "./crates/comet_structs", workspace = true } \ No newline at end of file diff --git a/crates/comet_app/src/app.rs b/crates/comet_app/src/app.rs index 977f8ec..b998b7b 100755 --- a/crates/comet_app/src/app.rs +++ b/crates/comet_app/src/app.rs @@ -111,11 +111,6 @@ impl App { self } - pub fn with_audio(mut self, audio_system: Box) -> Self { - self.audio = audio_system; - self - } - fn load_icon(path: &std::path::Path) -> Option { let image = match image::open(path) { Ok(image) => image, @@ -392,7 +387,8 @@ impl App { match renderer.render() { Ok(_) => {} Err( - wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated, + wgpu::SurfaceError::Lost + | wgpu::SurfaceError::Outdated, ) => { let size = renderer.size(); renderer.resize(size); diff --git a/examples/hello_sound.rs b/examples/hello_sound.rs deleted file mode 100644 index fa4d6a4..0000000 --- a/examples/hello_sound.rs +++ /dev/null @@ -1,26 +0,0 @@ -use comet::prelude::*; -use comet_sound::Audio; - -fn setup(app: &mut App, _renderer: &mut Renderer2D) { - app.load_audio("startup", "res/sounds/hit.ogg"); - app.play_audio("startup", true); // second parameter loops the sound - - // here the float indicated the volume percentage - // in the standard backend for audio in comet (kira) 0.0 is equal to -20dB and 1.0 to 0dB - app.set_volume("startup", 1.0); -} - -#[allow(unused_variables)] -fn update(app: &mut App, renderer: &mut Renderer2D, dt: f32) { - // in this example, update_audio doesnt do anything because the kira audio system - // doesnt need any update - app.update_audio(dt); -} - -fn main() { - App::new() - .with_title("Comet Audio Example") - // This can be used to add your own sound engine to the engine - .with_audio(Box::new(comet_sound::KiraAudio::new())) // to - .run::(setup, update); -} diff --git a/res/sounds/hit.ogg b/res/sounds/hit.ogg deleted file mode 100644 index a5cd995..0000000 Binary files a/res/sounds/hit.ogg and /dev/null differ