From fd01ccb4df49ae7c844b573fc2712edc0f229581 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sun, 7 Jul 2024 18:13:01 +0200 Subject: [PATCH] play sound in a loop --- build.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index edecaa2..e718dc4 100644 --- a/build.rs +++ b/build.rs @@ -128,7 +128,11 @@ impl AssetsWriter { writeln!(file, "{indent}\t\t_ctx.load_texture_from_bytes({asset_const_name:?}, {asset_const_name});")?; } for asset_const_name in root.sound_assets.values() { - writeln!(file, "{indent}\t\tcomfy::load_sound_from_bytes({asset_const_name:?}, {asset_const_name}, Default::default());")?; + writeln!(file, "{indent}\t\tcomfy::load_sound_from_bytes({asset_const_name:?}, {asset_const_name},")?; + writeln!( + file, + "{indent}\t\t\tcomfy::StaticSoundSettings::new().loop_region(..));" + )?; } for group_name in root.groups.keys() { writeln!(file, "{indent}\t\t{group_name}::Assets::load(_ctx);")?;