[−][src]Struct amethyst_audio::output::Output
A speaker(s) through which audio can be played.
By convention, the default output is stored as a resource in the World
.
Methods
impl Output
[src]
pub fn name(&self) -> String
[src]
Gets the name of the output
pub fn try_play_once(
&self,
source: &Source,
volume: f32
) -> Result<(), DecoderError>
[src]
&self,
source: &Source,
volume: f32
) -> Result<(), DecoderError>
Play a sound once. A volume of 1.0 is unchanged, while 0.0 is silent.
This will return an Error if the loaded audio file in source could not be decoded.
pub fn play_once(&self, source: &Source, volume: f32)
[src]
Play a sound once. A volume of 1.0 is unchanged, while 0.0 is silent.
This may silently fail, in order to get error information use try_play_once
.
pub fn play_n_times(&self, source: &Source, volume: f32, n: u16)
[src]
Play a sound n times. A volume of 1.0 is unchanged, while 0.0 is silent.
This may silently fail, in order to get error information use try_play_n_times
.
pub fn try_play_n_times(
&self,
source: &Source,
volume: f32,
n: u16
) -> Result<(), DecoderError>
[src]
&self,
source: &Source,
volume: f32,
n: u16
) -> Result<(), DecoderError>
Play a sound n times. A volume of 1.0 is unchanged, while 0.0 is silent.
This will return an Error if the loaded audio file in source could not be decoded.
Trait Implementations
impl Eq for Output
[src]
impl PartialEq<Output> for Output
[src]
impl Clone for Output
[src]
fn clone(&self) -> Output
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Output
[src]
Convenience method for opening the default output device.
Since most modern hardware features audio output, this implementation fails if a device can't be initialized. Use an alternative initialization scheme if running on hardware without an integrated audio chip.
impl Debug for Output
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> Resource for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> TryDefault for T where
T: Default,
T: Default,
fn try_default() -> Result<T, String>
fn unwrap_default() -> Self
Calls try_default
and panics on an error case.
impl<T> Erased for T
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> Clone for T where
T: Clone,
[src]
T: Clone,