complete CLI for input & output to a different format (MP3 lame is freaky)
This commit is contained in:
parent
2cf1ec385f
commit
e4dddb4aba
6 changed files with 700 additions and 71 deletions
|
@ -1,4 +1,4 @@
|
|||
use std::borrow::Cow;
|
||||
use std::{borrow::Cow, convert::Infallible};
|
||||
|
||||
use super::sample::Sample;
|
||||
use cfg_if::cfg_if;
|
||||
|
@ -17,6 +17,12 @@ pub struct RawSamples<T>(Vec<T>)
|
|||
where
|
||||
T: Sample;
|
||||
|
||||
impl<T: Sample> RawSamples<T> {
|
||||
pub fn into_inner(self) -> Vec<T> {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> IntoDataBytes for RawSamples<T>
|
||||
where
|
||||
T: Sample + ToBytes,
|
||||
|
@ -34,7 +40,7 @@ where
|
|||
T: Sample + FromBytes + ToBytes + Zero,
|
||||
<T as FromBytes>::Bytes: Sized + for<'a> TryFrom<&'a [u8]>,
|
||||
{
|
||||
type Error = ();
|
||||
type Error = Infallible;
|
||||
type Format = ();
|
||||
fn try_from_data_bytes(
|
||||
bytes: crate::Bytes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue