pub struct AudioEncoderOutputTest {
pub output_file: Option<&'static str>,
pub input_audio: PcmAudio,
pub expected_output_size: OutputSize,
pub expected_digests: Option<Vec<ExpectedDigest>>,
}
Expand description
An output test runs audio through the encoder and checks that the output is expected. It checks the output size and if the hash was passed in, it checks that all that data emitted when hashed sequentially results in the expected digest. Oob bytes are hashed first.
Fields§
§output_file: Option<&'static str>
If provided, the output will also be written to this file. Use this to verify new files with a decoder before using their digest in tests.
input_audio: PcmAudio
§expected_output_size: OutputSize
§expected_digests: Option<Vec<ExpectedDigest>>
Implementations§
Source§impl AudioEncoderOutputTest
impl AudioEncoderOutputTest
pub fn saw_wave_test( frames_per_second: u32, expected_output_size: OutputSize, expected_digests: Vec<ExpectedDigest>, ) -> Self
Auto Trait Implementations§
impl Freeze for AudioEncoderOutputTest
impl RefUnwindSafe for AudioEncoderOutputTest
impl Send for AudioEncoderOutputTest
impl Sync for AudioEncoderOutputTest
impl Unpin for AudioEncoderOutputTest
impl UnwindSafe for AudioEncoderOutputTest
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