Struct Channel

Source
pub struct Channel { /* private fields */ }
Expand description

Channel Object

Implementations§

Source§

impl Channel

Source

pub fn new() -> Channel

Source

pub fn release(&mut self)

Source

pub fn get_system_object(&self) -> Result<Sys, Status>

Source

pub fn stop(&self) -> Status

Source

pub fn get_spectrum( &self, spectrum_size: usize, channel_offset: Option<i32>, window_type: Option<DspFftWindow>, ) -> Result<Vec<f32>, Status>

channel_offset: 0/1 -> left channel/right channel

Source

pub fn get_wave_data( &self, wave_size: usize, channel_offset: i32, ) -> Result<Vec<f32>, Status>

Source

pub fn is_init(&self) -> bool

Source

pub fn is_playing(&self) -> Result<bool, Status>

Source

pub fn is_virtual(&self) -> Result<bool, Status>

Source

pub fn get_audibility(&self) -> Result<f32, Status>

Source

pub fn get_current_sound(&self) -> Result<Sound, Status>

Source

pub fn get_index(&self) -> Result<i32, Status>

Source

pub fn set_volume(&self, volume: f32) -> Status

Source

pub fn get_volume(&self) -> Result<f32, Status>

Source

pub fn set_frequency(&self, frequency: f32) -> Status

Source

pub fn get_frequency(&self) -> Result<f32, Status>

Source

pub fn set_pan(&self, pan: f32) -> Status

Source

pub fn get_pan(&self) -> Result<f32, Status>

Source

pub fn set_mute(&self, mute: bool) -> Status

Source

pub fn get_mute(&self) -> Result<bool, Status>

Source

pub fn set_paused(&self, paused: bool) -> Status

Source

pub fn get_paused(&self) -> Result<bool, Status>

Source

pub fn set_delay( &self, delay_type: DelayType, delay_hi: usize, delay_lo: usize, ) -> Status

Source

pub fn get_delay( &self, delay_type: DelayType, ) -> Result<(DelayType, usize, usize), Status>

Source

pub fn set_speaker_mix(&self, smo: &SpeakerMixOptions) -> Status

Source

pub fn get_speaker_mix(&self) -> Result<SpeakerMixOptions, Status>

Source

pub fn set_speaker_level( &self, speaker: Speaker, levels: &mut Vec<f32>, ) -> Status

Source

pub fn get_speaker_level( &self, speaker: Speaker, num_levels: usize, ) -> Result<Vec<f32>, Status>

Source

pub fn set_input_channel_mix(&self, levels: &mut Vec<f32>) -> Status

Source

pub fn get_input_channel_mix( &self, num_levels: usize, ) -> Result<Vec<f32>, Status>

Source

pub fn set_priority(&self, priority: i32) -> Status

Source

pub fn get_priority(&self) -> Result<i32, Status>

Source

pub fn set_position(&self, position: usize, TimeUnit: TimeUnit) -> Status

Source

pub fn get_position(&self, TimeUnit: TimeUnit) -> Result<usize, Status>

Source

pub fn set_reverb_properties(&self, prop: &ReverbChannelProperties) -> Status

Source

pub fn get_reverb_properties(&self) -> Result<ReverbChannelProperties, Status>

Source

pub fn set_low_pass_gain(&self, gain: f32) -> Status

Source

pub fn get_low_pass_gain(&self) -> Result<f32, Status>

Source

pub fn set_channel_group(&mut self, channel_group: &ChannelGroup) -> Status

Source

pub fn get_channel_group(&self) -> Result<ChannelGroup, Status>

Source

pub fn set_3D_attributes(&self, position: &Vector, velocity: &Vector) -> Status

Source

pub fn get_3D_attributes(&self) -> Result<(Vector, Vector), Status>

Source

pub fn set_3D_min_max_distance( &self, min_distance: f32, max_distance: f32, ) -> Status

Source

pub fn get_3D_min_max_distance(&self) -> Result<(f32, f32), Status>

Source

pub fn set_3D_cone_settings( &self, inside_cone_angle: f32, outside_cone_angle: f32, outside_volume: f32, ) -> Status

Source

pub fn get_3D_cone_settings(&self) -> Result<(f32, f32, f32), Status>

Source

pub fn set_3D_cone_orientation(&self, orientation: &Vector) -> Status

Source

pub fn get_3D_cone_orientation(&self) -> Result<Vector, Status>

Source

pub fn set_3D_custom_rolloff(&self, points: &Vec<Vector>) -> Status

Source

pub fn get_3D_custom_rolloff(&self) -> Result<Vec<Vector>, Status>

Source

pub fn set_3D_occlusion( &self, direct_occlusion: f32, reverb_occlusion: f32, ) -> Status

Source

pub fn get_3D_occlusion(&self) -> Result<(f32, f32), Status>

Source

pub fn set_3D_spread(&self, angle: f32) -> Status

Source

pub fn get_3D_spread(&self) -> Result<f32, Status>

Source

pub fn set_3D_pan_level(&self, level: f32) -> Status

Source

pub fn get_3D_pan_level(&self) -> Result<f32, Status>

Source

pub fn set_3D_doppler_level(&self, level: f32) -> Status

Source

pub fn get_3D_doppler_level(&self) -> Result<f32, Status>

Source

pub fn set_3D_distance_filter( &self, custom: bool, custom_level: f32, center_freq: f32, ) -> Status

Source

pub fn get_3D_distance_filter(&self) -> Result<(bool, f32, f32), Status>

Source

pub fn get_DSP_head(&self) -> Result<Dsp, Status>

Source

pub fn add_DSP(&self, dsp: &Dsp) -> Result<DspConnection, Status>

Source

pub fn set_mode(&self, Mode: Mode) -> Status

Source

pub fn get_mode(&self) -> Result<Mode, Status>

Source

pub fn set_loop_count(&self, loop_count: i32) -> Status

Source

pub fn get_loop_count(&self) -> Result<i32, Status>

Source

pub fn set_loop_points( &self, loop_start: u32, TimeUnit: TimeUnit, loop_end: u32, TimeUnit: TimeUnit, ) -> Status

Source

pub fn get_loop_points( &self, TimeUnit: TimeUnit, TimeUnit: TimeUnit, ) -> Result<(u32, u32), Status>

Source

pub fn set_user_data<'r, T>(&'r self, user_data: &'r mut T) -> Status

Source

pub fn get_user_data<'r, T>(&'r self) -> Result<&'r mut T, Status>

Source

pub fn get_memory_info( &self, MemoryBits: MemoryBits, EventMemoryBits: EventMemoryBits, ) -> Result<(u32, MemoryUsageDetails), Status>

Trait Implementations§

Source§

impl Drop for Channel

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.