use std::ptr::NonNull;
use fmod_sys::*;
mod callback;
mod dsp;
mod filtering;
mod general;
mod panning;
mod playback;
mod scheduling;
mod spatialization;
mod volume;
pub use callback::{ChannelControlCallback, ChannelControlType};
#[cfg(doc)]
use crate::{Channel, ChannelGroup};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(transparent)] pub struct ChannelControl {
pub(crate) inner: NonNull<FMOD_CHANNELCONTROL>,
}
#[cfg(not(feature = "thread-unsafe"))]
unsafe impl Send for ChannelControl {}
#[cfg(not(feature = "thread-unsafe"))]
unsafe impl Sync for ChannelControl {}
impl ChannelControl {
pub unsafe fn from_ffi(value: *mut FMOD_CHANNELCONTROL) -> Self {
let inner = NonNull::new(value).unwrap();
ChannelControl { inner }
}
pub fn as_ptr(self) -> *mut FMOD_CHANNELCONTROL {
self.inner.as_ptr()
}
}
impl From<ChannelControl> for *mut FMOD_CHANNELCONTROL {
fn from(value: ChannelControl) -> Self {
value.inner.as_ptr()
}
}