rhythm-open-exchange 0.6.2

A try to create the ffmpeg of vsrg
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::super::types::OsuTimingPoint;

#[must_use]
pub fn parse_timing_point(line: &str) -> Option<OsuTimingPoint> {
    let mut parts = line.split(',');

    Some(OsuTimingPoint {
        time: parts.next()?.parse().ok()?,
        beat_length: parts.next()?.parse().ok()?,
        meter: parts.next().and_then(|s| s.parse().ok()).unwrap_or(4),
        sample_set: parts.next().and_then(|s| s.parse().ok()).unwrap_or(0),
        sample_index: parts.next().and_then(|s| s.parse().ok()).unwrap_or(0),
        volume: parts.next().and_then(|s| s.parse().ok()).unwrap_or(100),
        uninherited: parts.next().map(|s| s == "1").unwrap_or(false),
        effects: parts.next().and_then(|s| s.parse().ok()).unwrap_or(0),
    })
}