use crate::ffi::vcall;
use std::ffi::CStr;
interface! {
#[doc(alias = "IEngineSound")]
pub struct EngineSound(sys::IEngineSound) = Engine c"IEngineSoundServer003";
}
impl<'s> EngineSound<'s> {
#[doc(alias = "PrecacheSound")]
pub fn precache_sound(self, sample: &CStr, preload: bool) -> bool {
unsafe {
vcall!(self.as_ptr() => IEngineSound_PrecacheSound(sample.as_ptr(), preload, false))
}
}
#[doc(alias = "IsSoundPrecached")]
pub fn is_sound_precached(self, sample: &CStr) -> bool {
unsafe { vcall!(self.as_ptr() => IEngineSound_IsSoundPrecached(sample.as_ptr())) }
}
}