pub fn render_float(&mut self, samples: usize) -> Vec<f32> {
        let output_channels = match self.output_mode.as_ref().expect("set_output not yet called") {
            OutputMode::StereoInterleaved => 2,
            OutputMode::StereoUnweaved => 2,
            OutputMode::Mono => 1,
        };

        let mut dst: Vec<f32> = Vec::with_capacity(samples * output_channels);
        let dst_ptr: *mut f32 = dst.as_mut_ptr();
        unsafe {
            tsf_render_float(self.tsf_ptr, dst_ptr, samples as c_int, 0);
            dst.set_len(samples*output_channels);
        }
        dst
    }
/// Render the specified number of samples as a float array.
///
/// Panics if called before `set_output`.
///
/// Returns a buffer of size: samples * number of output channels (the number of output channels
/// was specified by `Tsf::set_output`).
Render the specified number of samples as a float array.
Panics if called before `set_output`.

Returns a buffer of size: samples * number of output channels (the number of output channels
was specified by `Tsf::set_output`).
Render the specified number of samples as a float array . Panics if called before ` set_output ` . Returns a buffer of size : samples * number of output channels ( the number of output channels was specified by ` Tsf :: set_output ` ) .
pub fn render_float(&mut self, samples: usize) -> Vec<f32> {
        let output_channels = match self.output_mode.as_ref().expect("set_output not yet called") {
            OutputMode::StereoInterleaved => 2,
            OutputMode::StereoUnweaved => 2,
            OutputMode::Mono => 1,
        };
        let mut dst: Vec<f32> = Vec::with_capacity(samples * output_channels);
        let dst_ptr: *mut f32 = dst.as_mut_ptr();
        unsafe {
            tsf_render_float(self.tsf_ptr, dst_ptr, samples as c_int, 0);
            dst.set_len(samples*output_channels);
        }
        dst
    }
pub fn render_float ( & mut self , samples : usize ) -> Vec < f32 > { let output_channels = match self . output_mode . as_ref ( ) . expect ( " " ) { OutputMode :: StereoInterleaved => 2 , OutputMode :: StereoUnweaved => 2 , OutputMode :: Mono => 1 , } ; let mut dst : Vec < f32 > = Vec :: with_capacity ( samples * output_channels ) ; let dst_ptr : * mut f32 = dst . as_mut_ptr ( ) ; unsafe { tsf_render_float ( self . tsf_ptr , dst_ptr , samples as c_int , 0 ) ; dst . set_len ( samples * output_channels ) ; } dst }
Render the specified number of samples as a float array.
Render the specified number of samples as a float array .
&mut self
samples
usize
&mut self
samples
usize