/// Resamples the audio using a specific resampler.
Resamples the audio using a specific resampler.
Resamples the audio using a specific resampler .
pub fn resample_by_mode(&self, frame_rate_hz: u32, resample_mode: u32) -> Result<Self, Error> {
        let interleaved_samples = resample(
            self.frame_rate_hz,
            frame_rate_hz,
            self.num_channels,
            &self.interleaved_samples,
            resample_mode,
        )?;
        let num_frames = interleaved_samples.len() as u64 / self.num_channels as u64;
        Ok(Self {
            interleaved_samples,
            frame_rate_hz,
            num_channels: self.num_channels,
            num_frames,
        })
    }
pub fn resample_by_mode ( & self , frame_rate_hz : u32 , resample_mode : u32 ) -> Result < Self , Error > { let interleaved_samples = resample ( self . frame_rate_hz , frame_rate_hz , self . num_channels , & self . interleaved_samples , resample_mode , ) ? ; let num_frames = interleaved_samples . len ( ) as u64 / self . num_channels as u64 ; Ok ( Self { interleaved_samples , frame_rate_hz , num_channels : self . num_channels , num_frames , } ) }
Resamples the audio using a specific resampler.
Resamples the audio using a specific resampler .
&self
frame_rate_hz
u32
resample_mode
u32