Struct let_engine::resources::sounds::AudioSettings
source · pub struct AudioSettings {
pub sound_capacity: usize,
pub object_bound_sound_capacity: usize,
pub spatial_scene_capacity: usize,
}Expand description
The global audio settings that should be used throughout the game.
Fields§
§sound_capacity: usizeThe limit of how many sounds can exist at the same time.
object_bound_sound_capacity: usizeThe limit of how many sounds can be bound to objects to make them spatial.
spatial_scene_capacity: usizeThe limit of how many scenes can play spatial sounds.
Implementations§
source§impl AudioSettings
impl AudioSettings
sourcepub fn set_sound_capacities(&mut self, sound_capacity: usize)
pub fn set_sound_capacities(&mut self, sound_capacity: usize)
Sets the maximum amount of sounds.
sourcepub fn sound_capacity(self, sound_capacity: usize) -> Self
pub fn sound_capacity(self, sound_capacity: usize) -> Self
Sets the maximum amount of sounds and returns self.
sourcepub fn set_object_bound_sound_capacity(&mut self, sound_capacity: usize)
pub fn set_object_bound_sound_capacity(&mut self, sound_capacity: usize)
Sets the maximum amount of sounds you can bind on objects to make them spatial.
sourcepub fn object_bound_sound_capacity(self, sound_capacity: usize) -> Self
pub fn object_bound_sound_capacity(self, sound_capacity: usize) -> Self
Sets the maximum amount of sounds you can bind on objects to make them spatial and returns self.
sourcepub fn set_spatial_scene_capacity(&mut self, scene_capacity: usize)
pub fn set_spatial_scene_capacity(&mut self, scene_capacity: usize)
Sets the maximum amount of scenes that can play spatial sounds.
sourcepub fn spatial_scene_capacity(self, scene_capacity: usize) -> Self
pub fn spatial_scene_capacity(self, scene_capacity: usize) -> Self
Sets the maximum amount of scenes that can play spatial sounds and returns self.
Trait Implementations§
source§impl Clone for AudioSettings
impl Clone for AudioSettings
source§fn clone(&self) -> AudioSettings
fn clone(&self) -> AudioSettings
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for AudioSettings
impl Debug for AudioSettings
source§impl Default for AudioSettings
impl Default for AudioSettings
source§impl Ord for AudioSettings
impl Ord for AudioSettings
source§fn cmp(&self, other: &AudioSettings) -> Ordering
fn cmp(&self, other: &AudioSettings) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for AudioSettings
impl PartialEq for AudioSettings
source§fn eq(&self, other: &AudioSettings) -> bool
fn eq(&self, other: &AudioSettings) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for AudioSettings
impl PartialOrd for AudioSettings
source§fn partial_cmp(&self, other: &AudioSettings) -> Option<Ordering>
fn partial_cmp(&self, other: &AudioSettings) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for AudioSettings
impl Eq for AudioSettings
impl StructuralPartialEq for AudioSettings
Auto Trait Implementations§
impl RefUnwindSafe for AudioSettings
impl Send for AudioSettings
impl Sync for AudioSettings
impl Unpin for AudioSettings
impl UnwindSafe for AudioSettings
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.