pub struct MonoStream {
pub volume: f32,
/* private fields */
}Fields§
§volume: f32Implementations§
Source§impl MonoStream
impl MonoStream
pub const FRAME_STEP: f64 = 2.2675736961451248E-5f64
pub const DEFAULT_CAPACITY: usize = 4_096usize
pub const DEFAULT_VOLUME: f32 = 1f32
pub fn remaining(&self) -> usize
pub fn push(&mut self, data: f32)
pub fn push_batch(&mut self, volume_factor: f32, data: &[f32])
pub fn init_streaming(app: &mut App, setup_default_streaming: bool)
pub fn setup_streaming( commands: &mut Commands<'_, '_>, assets: &mut ResMut<'_, Assets<MonoStream>>, capacity: usize, volume: f32, )
pub fn setup_default_streaming( commands: Commands<'_, '_>, assets: ResMut<'_, Assets<MonoStream>>, )
Trait Implementations§
Source§impl Debug for MonoStream
impl Debug for MonoStream
Source§impl Decodable for MonoStream
impl Decodable for MonoStream
Source§type DecoderItem = <MonoStreamDecoder as Iterator>::Item
type DecoderItem = <MonoStreamDecoder as Iterator>::Item
The type of the audio samples.
Usually a
u16, i16 or f32, as those implement rodio::Sample.
Other types can implement the rodio::Sample trait as well.Source§type Decoder = MonoStreamDecoder
type Decoder = MonoStreamDecoder
The type of the iterator of the audio samples,
which iterates over samples of type
Self::DecoderItem.
Must be a rodio::Source so that it can provide information on the audio it is iterating over.Source§fn decoder(&self) -> Self::Decoder
fn decoder(&self) -> Self::Decoder
Build and return a
Self::Decoder of the implementing typeSource§impl TypePath for MonoStream
impl TypePath for MonoStream
Source§fn type_path() -> &'static str
fn type_path() -> &'static str
Returns the fully qualified path of the underlying type. Read more
Source§fn short_type_path() -> &'static str
fn short_type_path() -> &'static str
Returns a short, pretty-print enabled path to the type. Read more
Source§fn type_ident() -> Option<&'static str>
fn type_ident() -> Option<&'static str>
Source§fn crate_name() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
Source§impl VisitAssetDependencies for MonoStream
impl VisitAssetDependencies for MonoStream
fn visit_dependencies(&self, visit: &mut impl FnMut(UntypedAssetId))
impl Asset for MonoStream
Auto Trait Implementations§
impl Freeze for MonoStream
impl !RefUnwindSafe for MonoStream
impl Send for MonoStream
impl Sync for MonoStream
impl Unpin for MonoStream
impl !UnwindSafe for MonoStream
Blanket Implementations§
Source§impl<A> AssetContainer for Awhere
A: Asset,
impl<A> AssetContainer for Awhere
A: Asset,
fn insert(self: Box<A>, id: UntypedAssetId, world: &mut World)
fn asset_type_name(&self) -> &'static str
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DynamicTypePath for Twhere
T: TypePath,
impl<T> DynamicTypePath for Twhere
T: TypePath,
Source§fn reflect_type_path(&self) -> &str
fn reflect_type_path(&self) -> &str
See
TypePath::type_path.Source§fn reflect_short_type_path(&self) -> &str
fn reflect_short_type_path(&self) -> &str
Source§fn reflect_type_ident(&self) -> Option<&str>
fn reflect_type_ident(&self) -> Option<&str>
See
TypePath::type_ident.Source§fn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
See
TypePath::crate_name.