pub struct AudioSourceSnapshot {
pub entity: EntityId,
pub handle: AssetHandle<SoundData>,
pub position: Vec3,
pub volume: f32,
pub looping: bool,
pub autoplay: bool,
pub state: Option<PlaybackState>,
}Expand description
Per-source snapshot fed to SpatialMixingLane::mix.
Fields§
§entity: EntityIdOrigin entity (used to key the writeback).
handle: AssetHandle<SoundData>Sound data the source plays.
position: Vec3World-space position of the source.
volume: f32Linear gain.
looping: boolWhether the source loops on end.
autoplay: boolWhether the source starts playing on first encounter.
state: Option<PlaybackState>Current playback state, copied from the component each frame.
Mutations made by the lane go through
AudioPlaybackWriteback.
Trait Implementations§
Source§impl Clone for AudioSourceSnapshot
impl Clone for AudioSourceSnapshot
Source§fn clone(&self) -> AudioSourceSnapshot
fn clone(&self) -> AudioSourceSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AudioSourceSnapshot
impl RefUnwindSafe for AudioSourceSnapshot
impl Send for AudioSourceSnapshot
impl Sync for AudioSourceSnapshot
impl Unpin for AudioSourceSnapshot
impl UnsafeUnpin for AudioSourceSnapshot
impl UnwindSafe for AudioSourceSnapshot
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