Struct bevy_retrograde_audio::PlaySoundSettings [−][src]
pub struct PlaySoundSettings { pub id: Option<InstanceId>, pub volume: Value<f64>, pub playback_rate: Value<f64>, pub panning: Value<f64>, pub start_position: f64, pub reverse: bool, pub fade_in_tween: Option<Tween>, pub loop_start: InstanceLoopStart, pub track: InstanceTrackIndex, }
Expand description
Settings for an instance.
Fields
id: Option<InstanceId>
The unique identifier for the instance.
volume: Value<f64>
The volume of the instance.
playback_rate: Value<f64>
The playback rate of the instance, as a factor of the original playback rate.
panning: Value<f64>
The panning of the instance (0 = hard left, 1 = hard right).
start_position: f64
The position to start playing the instance at (in seconds).
reverse: bool
Whether to play the instance in reverse.
fade_in_tween: Option<Tween>
Whether to fade in the instance from silence, and if so, the tween to use.
loop_start: InstanceLoopStart
Whether the instance should loop, and if so, the position it should jump back to when it reaches the end.
track: InstanceTrackIndex
Which track to play the instance on.
Implementations
Creates a new InstanceSettings
with the default settings.
Sets the unique identifier for the instance.
Sets the volume of the instance.
Sets the playback rate of the instance.
Sets the panning of the instance.
Sets where in the sound playback will start (in seconds).
Play the instance in reverse.
Sets the tween the instance will use to fade in from silence.
Sets the portion of the sound that should be looped.
Sets the track the instance will play on.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for InstanceSettings
impl Send for InstanceSettings
impl Sync for InstanceSettings
impl Unpin for InstanceSettings
impl UnwindSafe for InstanceSettings
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: 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
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub 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. Read more
impl<T> FromWorld for T where
T: Default,
impl<T> FromWorld for T where
T: Default,
pub fn from_world(_world: &mut World) -> T
pub fn from_world(_world: &mut World) -> T
Creates Self
using data from the given [World]
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
pub fn vzip(self) -> V