Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 3x 12x 1x 11x 3x 8x 3x 5x 1x 1x 1x 1x 1x | import { PlaybackRate } from "../types"
export function playbackRateToNumeral(rate: PlaybackRate): number {
if (rate >= 5) {
return 5
}
if (rate <= 0.25) {
return 0.25
}
if (rate > 0.25 && rate < 5) {
return rate as number
}
switch (rate) {
case "very_fast":
return 1.5
case "fast":
return 1.25
case "slow":
return 0.75
case "very_slow":
return 0.5
default:
return 1.0
}
}
|