pub struct SoundInstance { /* fields omitted */ }
A handle to a single instance of a Sound
.
The audio thread will poll this for updates every 220 samples (roughly
every 5ms at a 44100hz sample rate).
Note that dropping a SoundInstance
does not stop playback.
Plays the sound if it is stopped, or resumes the sound if it is paused.
Stops the sound, and rewinds it to the beginning.
Sets the volume of the sound.
The parameter is used as a multiplier - for example, 1.0
would result in the
sound being played back at its original volume.
Sets the speed (and by extension, the pitch) of the sound.
The parameter is used as a multiplier - for example, 1.0
would result in the
sound being played back at its original speed.
Sets whether the sound should repeat or not.
Toggles whether the sound should repeat or not.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
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
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
impl<SS, SP> SupersetOf for SP where SS: SubsetOf<SP>, | |
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.
impl<T> SetParameter for T | |
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where T: Parameter<Self>, | |
Sets value
as a parameter of self
.