pub struct SpatialConfigBuilder { /* private fields */ }Expand description
Builder for SpatialConfig
Implementations§
Source§impl SpatialConfigBuilder
impl SpatialConfigBuilder
Sourcepub fn hrtf_database_path(self, path: PathBuf) -> Self
pub fn hrtf_database_path(self, path: PathBuf) -> Self
Set HRTF database path
Sourcepub fn sample_rate(self, sample_rate: u32) -> Self
pub fn sample_rate(self, sample_rate: u32) -> Self
Set sample rate
Sourcepub fn buffer_size(self, buffer_size: usize) -> Self
pub fn buffer_size(self, buffer_size: usize) -> Self
Set buffer size
Sourcepub fn room_dimensions(self, width: f32, height: f32, depth: f32) -> Self
pub fn room_dimensions(self, width: f32, height: f32, depth: f32) -> Self
Set room dimensions
Sourcepub fn reverb_time(self, reverb_time: f32) -> Self
pub fn reverb_time(self, reverb_time: f32) -> Self
Set reverb time
Sourcepub fn distance_attenuation(self, enabled: bool) -> Self
pub fn distance_attenuation(self, enabled: bool) -> Self
Enable/disable distance attenuation
Sourcepub fn air_absorption(self, enabled: bool) -> Self
pub fn air_absorption(self, enabled: bool) -> Self
Enable/disable air absorption
Sourcepub fn max_distance(self, max_distance: f32) -> Self
pub fn max_distance(self, max_distance: f32) -> Self
Set maximum processing distance
Sourcepub fn speed_of_sound(self, speed: f32) -> Self
pub fn speed_of_sound(self, speed: f32) -> Self
Set speed of sound
Sourcepub fn build(self) -> Result<SpatialConfig>
pub fn build(self) -> Result<SpatialConfig>
Build the configuration
Trait Implementations§
Source§impl Debug for SpatialConfigBuilder
impl Debug for SpatialConfigBuilder
Source§impl Default for SpatialConfigBuilder
impl Default for SpatialConfigBuilder
Source§fn default() -> SpatialConfigBuilder
fn default() -> SpatialConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SpatialConfigBuilder
impl RefUnwindSafe for SpatialConfigBuilder
impl Send for SpatialConfigBuilder
impl Sync for SpatialConfigBuilder
impl Unpin for SpatialConfigBuilder
impl UnsafeUnpin for SpatialConfigBuilder
impl UnwindSafe for SpatialConfigBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more