pub fn num_samples(&self) -> usize {
        let recording_state = self.loop_state.recording_state.get();

        if recording_state == RecordingState::Empty {
            return 0;
        }

        let clip = self.looped_clip.get();
        let start = self.loop_state.start.load(Ordering::Relaxed);
        let end = self.end_cursor();

        if end >= start {
            end - start
        } else {
            clip.num_samples() - start + end
        }
    }
/// Returns the size of the current loop
Returns the size of the current loop
Returns the size of the current loop
pub fn num_samples(&self) -> usize {
        let recording_state = self.loop_state.recording_state.get();
        if recording_state == RecordingState::Empty {
            return 0;
        }
        let clip = self.looped_clip.get();
        let start = self.loop_state.start.load(Ordering::Relaxed);
        let end = self.end_cursor();
        if end >= start {
            end - start
        } else {
            clip.num_samples() - start + end
        }
    }
pub fn num_samples ( & self ) -> usize { let recording_state = self . loop_state . recording_state . get ( ) ; if recording_state == RecordingState :: Empty { return 0 ; } let clip = self . looped_clip . get ( ) ; let start = self . loop_state . start . load ( Ordering :: Relaxed ) ; let end = self . end_cursor ( ) ; if end >= start { end - start } else { clip . num_samples ( ) - start + end } }
Returns the size of the current loop
Returns the size of the current loop
&self
&self