Struct rsynth::backend::combined::TestAudioReader [−][src]
An audio reader, useful for testing.
Implementations
impl<'b, S> TestAudioReader<'b, S> where
S: Copy,
[src]
S: Copy,
pub fn new(
reader: AudioBufferReader<'b, S>,
expected_channels: usize,
expected_buffer_sizes: Vec<usize>
) -> Self
[src]
reader: AudioBufferReader<'b, S>,
expected_channels: usize,
expected_buffer_sizes: Vec<usize>
) -> Self
Create a new TestAudioReader
.
The newly created TestAudioReader
will read the same data as the reader
that is
provided with this method, but additionally checks the number of channels and of buffer
sizes, panicking when they do not match.
Trait Implementations
impl<'b, S> AudioReader<S> for TestAudioReader<'b, S> where
S: Copy,
[src]
S: Copy,
type Err = Infallible
The type of the error that occurs when reading data.
fn number_of_channels(&self) -> usize
[src]
fn frames_per_second(&self) -> u64
[src]
fn fill_buffer(
&mut self,
output: &mut AudioBufferOut<'_, '_, S>
) -> Result<usize, Self::Err>
[src]
&mut self,
output: &mut AudioBufferOut<'_, '_, S>
) -> Result<usize, Self::Err>
Auto Trait Implementations
impl<'b, S> RefUnwindSafe for TestAudioReader<'b, S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<'b, S> Send for TestAudioReader<'b, S> where
S: Send + Sync,
S: Send + Sync,
impl<'b, S> Sync for TestAudioReader<'b, S> where
S: Sync,
S: Sync,
impl<'b, S> Unpin for TestAudioReader<'b, S> where
S: Unpin,
S: Unpin,
impl<'b, S> UnwindSafe for TestAudioReader<'b, S> where
S: RefUnwindSafe + UnwindSafe,
S: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
T: FromSample<S> + ToSample<S>,
impl<T> From<T> for T
[src]
impl<S> FromSample<S> for S
pub fn from_sample_(s: S) -> S
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
U: FromSample<T>,
pub fn to_sample_(self) -> U
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,