synthizer 0.5.4

bindings to Synthizer, a library for 3D audio and effects
Documentation
use crate::internal_prelude::*;

#[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd, Hash)]
pub struct DirectSource(pub(crate) Handle);

impl DirectSource {
    pub fn new(context: &Context) -> Result<DirectSource> {
        wrap_constructor(|ud, cb| {
            let mut h = Default::default();
            check_error(unsafe {
                syz_createDirectSource(
                    &mut h as *mut syz_Handle,
                    context.to_syz_handle(),
                    null_mut(),
                    ud,
                    Some(cb),
                )
            })?;
            Ok(DirectSource(Handle::new(h)))
        })
    }

    source_properties!();

    object_common!();
    pausable_common!();
    source_common!();
}

handle_traits!(DirectSource);