pub fn new(
        buffer_duration: u64,
        exposed_buffer: Box<SampleExtractor>,
        working_buffer: Box<SampleExtractor>,
    ) -> DoubleAudioBuffer {
        DoubleAudioBuffer {
            state: gst::State::Null,
            audio_buffer: AudioBuffer::new(buffer_duration),
            samples_since_last_extract: 0,
            exposed_buffer_mtx: Arc::new(Mutex::new(exposed_buffer)),
            working_buffer: Some(working_buffer),
            lower_to_keep: 0,
            sample_gauge: None,
            sample_window: None,
            max_sample_window: 0,
            can_handle_eos: true,
            has_new_position: false,
        }
    }
// need 2 arguments for new as we can't clone buffers as they are known
// as trait SampleExtractor
need 2 arguments for new as we can't clone buffers as they are known
as trait SampleExtractor
need 2 arguments for new as we can ' t clone buffers as they are known as trait SampleExtractor
pub fn new(
        buffer_duration: u64,
        exposed_buffer: Box<SampleExtractor>,
        working_buffer: Box<SampleExtractor>,
    ) -> DoubleAudioBuffer {
        DoubleAudioBuffer {
            state: gst::State::Null,
            audio_buffer: AudioBuffer::new(buffer_duration),
            samples_since_last_extract: 0,
            exposed_buffer_mtx: Arc::new(Mutex::new(exposed_buffer)),
            working_buffer: Some(working_buffer),
            lower_to_keep: 0,
            sample_gauge: None,
            sample_window: None,
            max_sample_window: 0,
            can_handle_eos: true,
            has_new_position: false,
        }
    }
pub fn new ( buffer_duration : u64 , exposed_buffer : Box < SampleExtractor > , working_buffer : Box < SampleExtractor > , ) -> DoubleAudioBuffer { DoubleAudioBuffer { state : gst :: State :: Null , audio_buffer : AudioBuffer :: new ( buffer_duration ) , samples_since_last_extract : 0 , exposed_buffer_mtx : Arc :: new ( Mutex :: new ( exposed_buffer ) ) , working_buffer : Some ( working_buffer ) , lower_to_keep : 0 , sample_gauge : None , sample_window : None , max_sample_window : 0 , can_handle_eos : true , has_new_position : false , } }
need 2 arguments for new as we can't clone buffers as they are known
as trait SampleExtractor
need 2 arguments for new as we can ' t clone buffers as they are known as trait SampleExtractor
buffer_duration
u64
exposed_buffer
Box<SampleExtractor>
working_buffer
Box<SampleExtractor>
buffer_duration
u64
exposed_buffer
Box<SampleExtractor>
working_buffer
Box<SampleExtractor>