pub fn reset(&mut self) {
        debug!("resetting");

        self.capacity = 0;
        self.rate = 0;
        self.sample_duration = 0;
        self.channels = 0;
        self.drain_size = 0;
        self.clean_samples();
    }
// Reset the AudioBuffer keeping continuity
// This is required in case of a caps change or stream change
// as samples may come in the same segment despite the change.
// If the media is paused and then set back to playback, preroll
// will be performed in the same segment as before the change.
// So we need to keep track of the segment start in order not
// to reset current sequence (self.last_buffer_upper).
Reset the AudioBuffer keeping continuity
This is required in case of a caps change or stream change
as samples may come in the same segment despite the change.
If the media is paused and then set back to playback, preroll
will be performed in the same segment as before the change.
So we need to keep track of the segment start in order not
to reset current sequence (self.last_buffer_upper).
Reset the AudioBuffer keeping continuity This is required in case of a caps change or stream change as samples may come in the same segment despite the change . If the media is paused and then set back to playback preroll will be performed in the same segment as before the change . So we need to keep track of the segment start in order not to reset current sequence ( self . last_buffer_upper ) .
pub fn reset(&mut self) {
        debug!("resetting");
        self.capacity = 0;
        self.rate = 0;
        self.sample_duration = 0;
        self.channels = 0;
        self.drain_size = 0;
        self.clean_samples();
    }
pub fn reset ( & mut self ) { debug ! ( " " ) ; self . capacity = 0 ; self . rate = 0 ; self . sample_duration = 0 ; self . channels = 0 ; self . drain_size = 0 ; self . clean_samples ( ) ; }
Reset the AudioBuffer keeping continuity
This is required in case of a caps change or stream change
as samples may come in the same segment despite the change.
Reset the AudioBuffer keeping continuity This is required in case of a caps change or stream change as samples may come in the same segment despite the change .
&mut self
&mut self