diff --git a/src/source/mod.rs b/src/source/mod.rs index 71116af..9d6dc31 100644 --- a/src/source/mod.rs +++ b/src/source/mod.rs @@ -227,3 +227,69 @@ pub trait Source: Iterator SamplesConverter::new(self) } } + +impl Source for Box> where S: Sample { + #[inline] + fn current_frame_len(&self) -> Option { + (**self).current_frame_len() + } + + #[inline] + fn channels(&self) -> u16 { + (**self).channels() + } + + #[inline] + fn samples_rate(&self) -> u32 { + (**self).samples_rate() + } + + #[inline] + fn total_duration(&self) -> Option { + (**self).total_duration() + } +} + +impl Source for Box + Send> where S: Sample { + #[inline] + fn current_frame_len(&self) -> Option { + (**self).current_frame_len() + } + + #[inline] + fn channels(&self) -> u16 { + (**self).channels() + } + + #[inline] + fn samples_rate(&self) -> u32 { + (**self).samples_rate() + } + + #[inline] + fn total_duration(&self) -> Option { + (**self).total_duration() + } +} + +impl Source for Box + Send + Sync> where S: Sample { + #[inline] + fn current_frame_len(&self) -> Option { + (**self).current_frame_len() + } + + #[inline] + fn channels(&self) -> u16 { + (**self).channels() + } + + #[inline] + fn samples_rate(&self) -> u32 { + (**self).samples_rate() + } + + #[inline] + fn total_duration(&self) -> Option { + (**self).total_duration() + } +}