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