Struct rscenes::prelude::Sound

#[repr(C)]
pub struct Sound { pub stream: AudioStream, pub frameCount: u32, }

Fields§

§stream: AudioStream§frameCount: u32

Trait Implementations§

§

impl Clone for Sound

§

fn clone(&self) -> Sound

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Sound

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl SoundExt for Sound

source§

fn load(filename: impl Display) -> Result<Sound, String>

Load sound from file
source§

fn load_from_wave(wave: Wave) -> Sound

Load sound from wave data
source§

fn alias(self) -> Sound

Create a new sound that shares the same sample data as the source sound, does not own the sound data
source§

fn is_ready(self) -> bool

Check whether a sound is ready
source§

fn unload(self)

Unload wave data
source§

fn unload_alias(self)

Unload a sound alias (does not deallocate sample data)
source§

fn play(self)

Play a sound
source§

fn stop(self)

Stop playing a sound
source§

fn pause(self)

Pause a sound
source§

fn resume(self)

Resume a paused sound
source§

fn is_playing(self) -> bool

Check whether a sound is currently playing
source§

fn set_volume(self, volume: f32)

Set volume for a sound (1.0 is max level)
source§

fn set_pitch(self, pitch: f32)

Set pitch for a sound (1.0 is base level)
source§

fn set_pan(self, pan: f32)

Set pan for a sound (0.5 is center)
§

impl Copy for Sound

Auto Trait Implementations§

§

impl RefUnwindSafe for Sound

§

impl !Send for Sound

§

impl !Sync for Sound

§

impl Unpin for Sound

§

impl UnwindSafe for Sound

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.