pub struct ShmLayout {
pub channels_in: u32,
pub channels_out: u32,
pub block_size: u32,
pub slots: u32,
}Expand description
Geometry of the shared-memory audio file.
Fields§
§channels_in: u32§channels_out: u32§block_size: u32§slots: u32Implementations§
Source§impl ShmLayout
impl ShmLayout
pub fn slot_bytes(&self) -> usize
pub fn total_bytes(&self) -> usize
Sourcepub fn input_offset(&self, slot: u32, ch: u32) -> usize
pub fn input_offset(&self, slot: u32, ch: u32) -> usize
Byte offset of input channel ch in slot.
Sourcepub fn output_offset(&self, slot: u32, ch: u32) -> usize
pub fn output_offset(&self, slot: u32, ch: u32) -> usize
Byte offset of output channel ch in slot.
pub fn write_header(&self, buf: &mut [u8])
pub fn read_header(buf: &[u8]) -> Result<ShmLayout, String>
Trait Implementations§
impl Copy for ShmLayout
impl Eq for ShmLayout
impl StructuralPartialEq for ShmLayout
Auto Trait Implementations§
impl Freeze for ShmLayout
impl RefUnwindSafe for ShmLayout
impl Send for ShmLayout
impl Sync for ShmLayout
impl Unpin for ShmLayout
impl UnsafeUnpin for ShmLayout
impl UnwindSafe for ShmLayout
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more