Enum bevy_kira_components::sources::audio_file::source::AudioFile
source · pub enum AudioFile {
Static(Arc<[u8]>, StaticSoundSettings),
Streaming {
path: PathBuf,
settings: StreamingSoundSettings,
},
}
Expand description
Bevy [Asset
] implementation that wraps audio data for [kira
].
Streaming audio data is currently not possible over the internet, so when targeting the web,
all audio sources need to be Static
.
Variants§
Static(Arc<[u8]>, StaticSoundSettings)
Static audio data, fully loaded in memory.
Streaming
Streaming audio data, pointing to a path on disk and loaded on demand.
Trait Implementations§
source§impl AudioSource for AudioFile
impl AudioSource for AudioFile
§type Error = PlaySoundError<AudioFileError>
type Error = PlaySoundError<AudioFileError>
Error type that encompasses possible errors that can happen when creating the audio source
§type Handle = AudioFileHandle
type Handle = AudioFileHandle
Handle to the audio source, which allows control over the source from a non-audio thread. Read more
§type Settings = AudioFileSettings
type Settings = AudioFileSettings
Settings associated with this audio source, and passed in to the source for its creation.
source§impl TypePath for AudioFile
impl TypePath for AudioFile
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 AudioFile
impl VisitAssetDependencies for AudioFile
fn visit_dependencies(&self, _visit: &mut impl FnMut(UntypedAssetId))
impl Asset for AudioFile
Auto Trait Implementations§
impl Freeze for AudioFile
impl RefUnwindSafe for AudioFile
impl Send for AudioFile
impl Sync for AudioFile
impl Unpin for AudioFile
impl UnwindSafe for AudioFile
Blanket Implementations§
§impl<A> AssetContainer for Awhere
A: Asset,
impl<A> AssetContainer for Awhere
A: Asset,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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
.§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
.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DynamicTypePath for Twhere
T: TypePath,
impl<T> DynamicTypePath for Twhere
T: TypePath,
§fn reflect_type_path(&self) -> &str
fn reflect_type_path(&self) -> &str
See [
TypePath::type_path
].§fn reflect_short_type_path(&self) -> &str
fn reflect_short_type_path(&self) -> &str
See [
TypePath::short_type_path
].§fn reflect_type_ident(&self) -> Option<&str>
fn reflect_type_ident(&self) -> Option<&str>
See [
TypePath::type_ident
].§fn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
See [
TypePath::crate_name
].§fn reflect_module_path(&self) -> Option<&str>
fn reflect_module_path(&self) -> Option<&str>
See [
TypePath::module_path
].