pub struct AudioClipAsset {
pub samples: u32,
pub chunks: Range<u32>,
}
Expand description
Playable audio track.
Fields§
§samples: u32
The total amount of samples in the chunks.
chunks: Range<u32>
The chunks containing the samples.
Trait Implementations§
Source§impl Asset for AudioClipAsset
impl Asset for AudioClipAsset
Source§fn get_chunks(&self) -> Option<Range<u32>>
fn get_chunks(&self) -> Option<Range<u32>>
If this asset refers to any regular chunks, returns the range
referenced.
Source§fn offset_chunks(&mut self, offset: i32)
fn offset_chunks(&mut self, offset: i32)
Applies an offset to all regular chunk references in the asset.
Source§fn get_sprite_chunks(&self) -> Option<Range<u32>>
fn get_sprite_chunks(&self) -> Option<Range<u32>>
If this asset refers to any sprite chunks, returns the range referenced.
Source§fn offset_sprite_chunks(&mut self, _offset: i32)
fn offset_sprite_chunks(&mut self, _offset: i32)
Applies an offset to all sprite chunk references in the asset.
Source§impl Debug for AudioClipAsset
impl Debug for AudioClipAsset
Source§impl Deserialize for AudioClipAsset
impl Deserialize for AudioClipAsset
Source§const SERIALIZED_SIZE: usize = 12usize
const SERIALIZED_SIZE: usize = 12usize
The length of the buffer passed into
Deserialize::deserialize
.Source§fn deserialize(src: &[u8]) -> Self
fn deserialize(src: &[u8]) -> Self
Deserializes the byte buffer into the struct. The length of
src
must
match the same type’s Deserialize::SERIALIZED_SIZE
constant.Source§impl Serialize for AudioClipAsset
impl Serialize for AudioClipAsset
Source§const SERIALIZED_SIZE: usize = 12usize
const SERIALIZED_SIZE: usize = 12usize
The length of the buffer passed into
Serialize::serialize
.Source§fn serialize(&self, dst: &mut [u8])
fn serialize(&self, dst: &mut [u8])
Serializes the struct into the byte buffer. The length of
dst
must
match the same type’s Serialize::SERIALIZED_SIZE
constant.Auto Trait Implementations§
impl Freeze for AudioClipAsset
impl RefUnwindSafe for AudioClipAsset
impl Send for AudioClipAsset
impl Sync for AudioClipAsset
impl Unpin for AudioClipAsset
impl UnwindSafe for AudioClipAsset
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