pub fn run(
        &mut self,
        input: &frame::Audio,
        output: &mut frame::Audio,
    ) -> Result<Option<Delay>, Error> {
        output.set_rate(self.output.rate);

        unsafe {
            if output.is_empty() {
                output.alloc(
                    self.output.format,
                    input.samples(),
                    self.output.channel_layout,
                );
            }

            match swr_convert_frame(self.as_mut_ptr(), output.as_mut_ptr(), input.as_ptr()) {
                0 => Ok(self.delay()),

                e => Err(Error::from(e)),
            }
        }
    }
/// Run the resampler from the given input to the given output.
///
/// When there are internal frames to process it will return `Ok(Some(Delay { .. }))`.
Run the resampler from the given input to the given output.
When there are internal frames to process it will return `Ok(Some(Delay { ..
Run the resampler from the given input to the given output . When there are internal frames to process it will return ` Ok ( Some ( Delay { ..
pub fn run(
        &mut self,
        input: &frame::Audio,
        output: &mut frame::Audio,
    ) -> Result<Option<Delay>, Error> {
        output.set_rate(self.output.rate);
        unsafe {
            if output.is_empty() {
                output.alloc(
                    self.output.format,
                    input.samples(),
                    self.output.channel_layout,
                );
            }
            match swr_convert_frame(self.as_mut_ptr(), output.as_mut_ptr(), input.as_ptr()) {
                0 => Ok(self.delay()),
                e => Err(Error::from(e)),
            }
        }
    }
pub fn run ( & mut self , input : & frame :: Audio , output : & mut frame :: Audio , ) -> Result < Option < Delay > , Error > { output . set_rate ( self . output . rate ) ; unsafe { if output . is_empty ( ) { output . alloc ( self . output . format , input . samples ( ) , self . output . channel_layout , ) ; } match swr_convert_frame ( self . as_mut_ptr ( ) , output . as_mut_ptr ( ) , input . as_ptr ( ) ) { 0 => Ok ( self . delay ( ) ) , e => Err ( Error :: from ( e ) ) , } } }
Run the resampler from the given input to the given output.
Run the resampler from the given input to the given output .
&mut self
input
&frame::Audio
output
&mut frame::Audio
&mut self
input
&frame::Audio
output
&mut frame::Audio