INNER CODE UNIT · Rust

sounds

PistonDevelopers/piston_window · src/piston_script.rs:354

        let sounds = unsafe { &mut *Current::<Sounds>::new() };
        sounds.insert(name, (file, None));
    }}

    dyon_fn!{fn bind_music__name_file(name: Arc<String>, file: Arc<String>) {
        use crate::piston_script::Music;
        let music = unsafe { &mut *Current::<Music>::new() };
        music.insert(name, (file, None));
    }}

    dyon_fn!{fn play_sound__name_repeat_volume(name: Arc<String>, repeat: f64, volume: f64) {
        use crate::piston_script::Sounds;
        use crate::piston_script::AudioManager;
        use kira::sound::static_sound::StaticSoundData;
        use kira::StartTime;
        use std::path::Path;
        use std::time::Duration;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…