INNER CODE UNIT · Rust
set_pitch
shawnscode/crayon · modules/audio/src/lib.rs:103
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 {
debug_assert!(
!CTX.is_null(),
"audio system has not been initialized properly."
);
&*CTX