pub struct AudioSystem(/* private fields */);Expand description
Syncs 3D transform data with the audio engine to provide 3D audio.
Implementations§
Trait Implementations§
Source§impl Debug for AudioSystem
impl Debug for AudioSystem
Source§impl Default for AudioSystem
impl Default for AudioSystem
Source§fn default() -> AudioSystem
fn default() -> AudioSystem
Returns the “default value” for a type. Read more
Source§impl<'a> System<'a> for AudioSystem
impl<'a> System<'a> for AudioSystem
Source§type SystemData = (Option<Read<'a, Output>>, Option<Read<'a, SelectedListener>>, Read<'a, EntitiesRes>, Storage<'a, Transform, Fetch<'a, MaskedStorage<Transform>>>, Storage<'a, AudioListener, Fetch<'a, MaskedStorage<AudioListener>>>, Storage<'a, AudioEmitter, FetchMut<'a, MaskedStorage<AudioEmitter>>>)
type SystemData = (Option<Read<'a, Output>>, Option<Read<'a, SelectedListener>>, Read<'a, EntitiesRes>, Storage<'a, Transform, Fetch<'a, MaskedStorage<Transform>>>, Storage<'a, AudioListener, Fetch<'a, MaskedStorage<AudioListener>>>, Storage<'a, AudioEmitter, FetchMut<'a, MaskedStorage<AudioEmitter>>>)
The resource bundle required to execute this system. Read more
Source§fn run(
&mut self,
(output, select_listener, entities, transform, listener, audio_emitter): Self::SystemData,
)
fn run( &mut self, (output, select_listener, entities, transform, listener, audio_emitter): Self::SystemData, )
Executes the system with the required system
data.
Source§fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTime
Returns a hint how long the system needs for running.
This is used to optimize the way they’re executed (might
allow more parallelization). Read more
Source§fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
Return the accessor from the
SystemData.Source§impl<'a, 'b> SystemDesc<'a, 'b, AudioSystem> for AudioSystemDesc
impl<'a, 'b> SystemDesc<'a, 'b, AudioSystem> for AudioSystemDesc
Auto Trait Implementations§
impl Freeze for AudioSystem
impl RefUnwindSafe for AudioSystem
impl Send for AudioSystem
impl Sync for AudioSystem
impl Unpin for AudioSystem
impl UnwindSafe for AudioSystem
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
Source§fn run(&mut self, world: &'a World, _: &ThreadPool)
fn run(&mut self, world: &'a World, _: &ThreadPool)
Runs the system/group of systems. Possibly in parallel depending
on how the structure is set up. Read more
Source§fn reads(&self, reads: &mut Vec<ResourceId>)
fn reads(&self, reads: &mut Vec<ResourceId>)
Accumulates the necessary read/shared resources from the
systems in this group.
Source§fn writes(&self, writes: &mut Vec<ResourceId>)
fn writes(&self, writes: &mut Vec<ResourceId>)
Accumulates the necessary write/exclusive resources from the
systems in this group.
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
Source§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
Source§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default and panics on an error case.