complete CLI for input & output to a different format (MP3 lame is freaky)

This commit is contained in:
brevalferrari 2025-06-20 10:55:48 +02:00
parent 2cf1ec385f
commit e4dddb4aba
Signed by: breval
GPG key ID: 913954DA013FAD4F
6 changed files with 700 additions and 71 deletions

View file

@ -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,