play sound in a loop
All checks were successful
Rust / rustfmt (pull_request) Successful in 20s
Rust / clippy (pull_request) Successful in 1m51s
Rust / build (pull_request) Successful in 3m9s

This commit is contained in:
Dominic 2024-07-07 18:13:01 +02:00
parent d68c8a6b15
commit fd01ccb4df
Signed by: msrd0
GPG key ID: AAF7C8430CA3345D

View file

@ -128,7 +128,11 @@ impl AssetsWriter {
writeln!(file, "{indent}\t\t_ctx.load_texture_from_bytes({asset_const_name:?}, {asset_const_name});")?; 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() { 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() { for group_name in root.groups.keys() {
writeln!(file, "{indent}\t\t{group_name}::Assets::load(_ctx);")?; writeln!(file, "{indent}\t\t{group_name}::Assets::load(_ctx);")?;