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 a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

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

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

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

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Creates Self using data from the given [World]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.