[−][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
.
Implementations
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 Clone for Output
[src]
impl Debug for Output
[src]
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.
Auto Trait Implementations
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Clone for T where
T: Clone,
[src]
T: Clone,
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
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> 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> TryDefault for T where
T: Default,
T: Default,
fn try_default() -> Result<T, String>
fn unwrap_default() -> Self
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,