Struct oxygengine_audio::component::AudioSource
source · pub struct AudioSource { /* private fields */ }
Implementations§
source§impl AudioSource
impl AudioSource
pub fn new(audio: Cow<'static, str>, streaming: bool) -> Self
pub fn new_play(audio: Cow<'static, str>, streaming: bool, play: bool) -> Self
pub fn new_complex( audio: Cow<'static, str>, streaming: bool, looped: bool, playback_rate: Scalar, volume: Scalar, play: bool ) -> Self
pub fn audio(&self) -> &str
pub fn streaming(&self) -> bool
pub fn looped(&self) -> bool
pub fn set_looped(&mut self, looped: bool)
pub fn playback_rate(&self) -> Scalar
pub fn set_playback_rate(&mut self, playback_rate: Scalar)
pub fn volume(&self) -> Scalar
pub fn set_volume(&mut self, volume: Scalar)
pub fn current_time(&self) -> Option<Scalar>
pub fn is_playing(&self) -> bool
pub fn play(&mut self)
pub fn stop(&mut self)
pub fn is_ready(&self) -> bool
Trait Implementations§
source§impl Clone for AudioSource
impl Clone for AudioSource
source§fn clone(&self) -> AudioSource
fn clone(&self) -> AudioSource
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AudioSource
impl Debug for AudioSource
source§impl Default for AudioSource
impl Default for AudioSource
source§impl From<AudioSourceConfig> for AudioSource
impl From<AudioSourceConfig> for AudioSource
source§fn from(config: AudioSourceConfig) -> Self
fn from(config: AudioSourceConfig) -> Self
Converts to this type from the input type.
source§impl PrefabProxy<AudioSourceConfig> for AudioSource
impl PrefabProxy<AudioSourceConfig> for AudioSource
fn from_proxy_with_extras( proxy: AudioSourcePrefabProxy, _: &HashMap<String, Entity>, _: StateToken ) -> Result<Self, PrefabError>
Auto Trait Implementations§
impl RefUnwindSafe for AudioSource
impl Send for AudioSource
impl Sync for AudioSource
impl Unpin for AudioSource
impl UnwindSafe for AudioSource
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
§impl<T> Initialize for Twhere
T: Default,
impl<T> Initialize for Twhere T: Default,
fn initialize(&mut self)
§unsafe fn initialize_raw(data: *mut ())
unsafe fn initialize_raw(data: *mut ())
Safety Read more