diff options
Diffstat (limited to 'src/convert.rs')
-rw-r--r-- | src/convert.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/convert.rs b/src/convert.rs index ca45e4a..884708d 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -15,6 +15,7 @@ struct PlayerState current_tick: u8, speed: u8, tempo: u8, + rpb: u8, loop_start: u8, loop_ctr: u8, row_extension: u8, @@ -172,6 +173,7 @@ impl<'a> Player<'a> current_tick: 0, speed: self.it.header.speed, tempo: self.it.header.tempo, + rpb: self.it.time_signature().unwrap_or((4, 16)).0 as u8, loop_start: 0, loop_ctr: !0, row_extension: 0, @@ -231,7 +233,7 @@ impl<'a> CellHandler for ConvertCellHandler<'a> let itfile::Cell{mask, note, inst, vol, efx, fxp} = cell; if !ch == 0 { - self.miditick += <Rational as From<u32>>::from(960) / (ps.speed as u16 * 4).into(); + self.miditick += <Rational as From<u32>>::from(960) / (ps.speed as u16 * ps.rpb as u16).into(); } ps } |