INNER CODE UNIT · Rust
set_volume
shawnscode/crayon · modules/audio/src/lib.rs:97
pub fn set_volume(handle: AudioSourceHandle, volume: f32) {
ctx().set_volume(handle, volume);
}
/// Sets the frequency-shift of a playing sound.
#[inline]
pub fn set_pitch(handle: AudioSourceHandle, pitch: f32) {
ctx().set_pitch(handle, pitch);
}
mod inside {
use super::system::AudioSystem;
static mut CTX: *const AudioSystem = std::ptr::null();
#[inline]
pub fn ctx() -> &'static AudioSystem {
unsafe {