pub struct AudioPlayerGenerated;Expand description
Sample struct type generated by the audio_player!
macro, showing methods and associated constants.
This page serves as the reference for what a generated audio player type
provides. For first-time readers, start with the
audio_player module documentation, then return
here for a complete list of available methods and associated constants.
The macro also generates AudioPlayerGeneratedPlayable, a trait-object
alias for clip sources at the same sample rate.
Auto-generated.
Implementations§
Source§impl AudioPlayerGenerated
impl AudioPlayerGenerated
Sourcepub const SAMPLE_RATE_HZ: u32 = VOICE_22050_HZ
pub const SAMPLE_RATE_HZ: u32 = VOICE_22050_HZ
Sample rate used for playback by this generated player type.
See the audio_player module docs for usage.
Sourcepub const INITIAL_VOLUME: Volume = Volume::MAX
pub const INITIAL_VOLUME: Volume = Volume::MAX
Initial runtime volume relative to Self::MAX_VOLUME.
Sourcepub const MAX_VOLUME: Volume = Volume::MAX
pub const MAX_VOLUME: Volume = Volume::MAX
Runtime volume ceiling for this generated player type.
Trait Implementations§
Source§impl AudioPlayer<VOICE_22050_HZ> for AudioPlayerGenerated
impl AudioPlayer<VOICE_22050_HZ> for AudioPlayerGenerated
Source§const SAMPLE_RATE_HZ: u32 = VOICE_22050_HZ
const SAMPLE_RATE_HZ: u32 = VOICE_22050_HZ
Sample rate in hertz for this generated player type.
Source§const MAX_CLIPS: usize = 16
const MAX_CLIPS: usize = 16
Maximum number of clips accepted by
play(...) for this generated type.Source§const INITIAL_VOLUME: Volume = Volume::MAX
const INITIAL_VOLUME: Volume = Volume::MAX
Initial runtime volume relative to
Self::MAX_VOLUME.Source§const MAX_VOLUME: Volume = Volume::MAX
const MAX_VOLUME: Volume = Volume::MAX
Runtime volume ceiling for this generated player type.
Source§fn play<I>(&self, audio_clips: I, at_end: AtEnd)where
I: IntoIterator<Item = &'static dyn Playable<VOICE_22050_HZ>>,
fn play<I>(&self, audio_clips: I, at_end: AtEnd)where
I: IntoIterator<Item = &'static dyn Playable<VOICE_22050_HZ>>,
Starts playback of one or more static audio clips. Read more
Source§async fn wait_until_stopped(&self)
async fn wait_until_stopped(&self)
Waits until playback is stopped. Read more
Source§fn set_volume(&self, volume: Volume)
fn set_volume(&self, volume: Volume)
Sets runtime playback volume relative to the generated player’s max volume. Read more
Auto Trait Implementations§
impl Freeze for AudioPlayerGenerated
impl RefUnwindSafe for AudioPlayerGenerated
impl Send for AudioPlayerGenerated
impl Sync for AudioPlayerGenerated
impl Unpin for AudioPlayerGenerated
impl UnsafeUnpin for AudioPlayerGenerated
impl UnwindSafe for AudioPlayerGenerated
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.