Trait audio::Channels[][src]

pub trait Channels<T>: Buf {
    pub fn channel(&self, channel: usize) -> Channel<'_, T>;
}

A trait describing something that has channels.

Required methods

pub fn channel(&self, channel: usize) -> Channel<'_, T>[src]

Return a handler to the buffer associated with the channel.

Note that we don’t access the buffer for the underlying channel directly as a linear buffer like &[T], because the underlying representation might be different.

We must instead make use of the various utility functions found on Channel to copy data out of the channel.

Panics

Panics if the specified channel is out of bound as reported by Buf::channels.

Loading content...

Implementations on Foreign Types

impl<'_, B, T> Channels<T> for &'_ B where
    B: Channels<T>, 
[src]

impl<T> Channels<T> for Vec<Vec<T, Global>, Global>[src]

impl<T> Channels<T> for [Vec<T, Global>][src]

impl<'_, B, T> Channels<T> for &'_ mut B where
    B: Channels<T> + ?Sized
[src]

Loading content...

Implementors

impl<B, T> Channels<T> for Read<B> where
    B: Channels<T>, 
[src]

impl<B, T> Channels<T> for ReadWrite<B> where
    B: Channels<T>, 
[src]

impl<B, T> Channels<T> for Write<B> where
    B: Channels<T>, 
[src]

impl<T> Channels<T> for Dynamic<T>[src]

impl<T> Channels<T> for audio::interleaved::Interleaved<T>[src]

impl<T> Channels<T> for audio::sequential::Sequential<T>[src]

impl<T> Channels<T> for audio::wrap::Interleaved<&[T]>[src]

impl<T> Channels<T> for audio::wrap::Interleaved<&mut [T]>[src]

impl<T> Channels<T> for audio::wrap::Sequential<&[T]>[src]

impl<T> Channels<T> for audio::wrap::Sequential<&mut [T]>[src]

impl<T, const N: usize> Channels<T> for audio::wrap::Interleaved<&[T; N]>[src]

impl<T, const N: usize> Channels<T> for audio::wrap::Interleaved<&mut [T; N]>[src]

impl<T, const N: usize> Channels<T> for audio::wrap::Interleaved<[T; N]>[src]

impl<T, const N: usize> Channels<T> for audio::wrap::Sequential<&[T; N]>[src]

impl<T, const N: usize> Channels<T> for audio::wrap::Sequential<&mut [T; N]>[src]

impl<T, const N: usize> Channels<T> for audio::wrap::Sequential<[T; N]>[src]

Loading content...