pub struct DspConnection { /* private fields */ }
Expand description
An interface that manages Digital Signal Processor (DSP) connections
Implementations§
Source§impl DspConnection
impl DspConnection
Sourcepub fn get_input(&self) -> Result<Dsp>
pub fn get_input(&self) -> Result<Dsp>
Retrieves the connection’s input Dsp
unit.
If Dsp::add_input
was just called, the connection might not be ready because the Dsp
system is still queued to be connected,
and may need to wait several milliseconds for the next mix to occur.
If so the function will return FMOD_RESULT::FMOD_ERR_NOTREADY
.
Sourcepub fn get_output(&self) -> Result<Dsp>
pub fn get_output(&self) -> Result<Dsp>
Retrieves the connection’s output DSP unit.
If Dsp::add_input
was just called, the connection might not be ready because the Dsp
system is still queued to be connected,
and may need to wait several milliseconds for the next mix to occur.
If so the function will return FMOD_RESULT::FMOD_ERR_NOTREADY
.
Sourcepub fn get_type(&self) -> Result<DspConnectionType>
pub fn get_type(&self) -> Result<DspConnectionType>
Retrieves the type of the connection between 2 DSP units.
Sourcepub fn get_userdata(&self) -> Result<*mut c_void>
pub fn get_userdata(&self) -> Result<*mut c_void>
Retrieves user data.
Source§impl DspConnection
impl DspConnection
Sourcepub fn set_mix_matrix<const IN: usize, const OUT: usize>(
&self,
matrix: [[f32; IN]; OUT],
) -> Result<()>
pub fn set_mix_matrix<const IN: usize, const OUT: usize>( &self, matrix: [[f32; IN]; OUT], ) -> Result<()>
Sets a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).
Matrix element values can be below 0 to invert a signal and above 1 to amplify the signal. Note that increasing the signal level too far may cause audible distortion.
Sourcepub fn get_mix_matrix<const IN: usize, const OUT: usize>(
&self,
) -> Result<([[f32; IN]; OUT], c_int, c_int)>
pub fn get_mix_matrix<const IN: usize, const OUT: usize>( &self, ) -> Result<([[f32; IN]; OUT], c_int, c_int)>
Retrieves a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).
Matrix element values can be below 0 to invert a signal and above 1 to amplify the signal. Note that increasing the signal level too far may cause audible distortion.
Source§impl DspConnection
impl DspConnection
Sourcepub unsafe fn from_ffi(value: *mut FMOD_DSPCONNECTION) -> Self
pub unsafe fn from_ffi(value: *mut FMOD_DSPCONNECTION) -> Self
§Safety
value
must be a valid pointer either aquired from Self::as_ptr
or FMOD.
§Panics
Panics if value
is null.
Sourcepub fn as_ptr(self) -> *mut FMOD_DSPCONNECTION
pub fn as_ptr(self) -> *mut FMOD_DSPCONNECTION
Converts self
into its raw representation.
Trait Implementations§
Source§impl Clone for DspConnection
impl Clone for DspConnection
Source§fn clone(&self) -> DspConnection
fn clone(&self) -> DspConnection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DspConnection
impl Debug for DspConnection
Source§impl From<DspConnection> for *mut FMOD_DSPCONNECTION
impl From<DspConnection> for *mut FMOD_DSPCONNECTION
Source§fn from(value: DspConnection) -> Self
fn from(value: DspConnection) -> Self
Source§impl Hash for DspConnection
impl Hash for DspConnection
Source§impl PartialEq for DspConnection
impl PartialEq for DspConnection
impl Copy for DspConnection
impl Eq for DspConnection
impl Send for DspConnection
thread-unsafe
only.impl StructuralPartialEq for DspConnection
impl Sync for DspConnection
thread-unsafe
only.