fmod/core/dsp_connection/
mod.rs1use std::ptr::NonNull;
8
9use fmod_sys::*;
10
11mod general;
12mod mix_properties;
13
14#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
16#[repr(transparent)] pub struct DspConnection {
18 pub(crate) inner: NonNull<FMOD_DSPCONNECTION>,
19}
20
21#[cfg(not(feature = "thread-unsafe"))]
22unsafe impl Send for DspConnection {}
23#[cfg(not(feature = "thread-unsafe"))]
24unsafe impl Sync for DspConnection {}
25
26impl DspConnection {
27 pub unsafe fn from_ffi(value: *mut FMOD_DSPCONNECTION) -> Self {
35 let inner = NonNull::new(value).unwrap();
36 DspConnection { inner }
37 }
38
39 pub fn as_ptr(self) -> *mut FMOD_DSPCONNECTION {
41 self.inner.as_ptr()
42 }
43}
44
45impl From<DspConnection> for *mut FMOD_DSPCONNECTION {
46 fn from(value: DspConnection) -> Self {
47 value.inner.as_ptr()
48 }
49}