pub fn pos_beats(&self) -> Option<f64> {
        match (
            self.pos_samples,
            self.pos_seconds,
            self.pos_beats,
            self.tempo,
        ) {
            (_, _, Some(pos_beats), _) => Some(pos_beats),
            (_, Some(pos_seconds), _, Some(tempo)) => Some(pos_seconds / 60.0 * tempo),
            (Some(pos_samples), _, _, Some(tempo)) => {
                Some(pos_samples as f64 / self.sample_rate as f64 / 60.0 * tempo)
            }
            (_, _, _, _) => None,
        }
    }
/// The position in the song in quarter notes. Will be calculated from other information if
/// needed.
The position in the song in quarter notes. Will be calculated from other information if
needed.
The position in the song in quarter notes . Will be calculated from other information if needed .
pub fn pos_beats(&self) -> Option<f64> {
        match (
            self.pos_samples,
            self.pos_seconds,
            self.pos_beats,
            self.tempo,
        ) {
            (_, _, Some(pos_beats), _) => Some(pos_beats),
            (_, Some(pos_seconds), _, Some(tempo)) => Some(pos_seconds / 60.0 * tempo),
            (Some(pos_samples), _, _, Some(tempo)) => {
                Some(pos_samples as f64 / self.sample_rate as f64 / 60.0 * tempo)
            }
            (_, _, _, _) => None,
        }
    }
pub fn pos_beats ( & self ) -> Option < f64 > { match ( self . pos_samples , self . pos_seconds , self . pos_beats , self . tempo , ) { ( _ , _ , Some ( pos_beats ) , _ ) => Some ( pos_beats ) , ( _ , Some ( pos_seconds ) , _ , Some ( tempo ) ) => Some ( pos_seconds / 60.0 * tempo ) , ( Some ( pos_samples ) , _ , _ , Some ( tempo ) ) => { Some ( pos_samples as f64 / self . sample_rate as f64 / 60.0 * tempo ) } ( _ , _ , _ , _ ) => None , } }
The position in the song in quarter notes.
The position in the song in quarter notes .
&self
&self