mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 20:29:35 +01:00
libtemporal: when computing Beats from a ticks value, do not try to pass potentially overflowing ticks value
This commit is contained in:
parent
1af74f7398
commit
d576fc8ca9
1 changed files with 3 additions and 2 deletions
|
|
@ -119,8 +119,9 @@ public:
|
|||
}
|
||||
|
||||
/** Create from ticks at the standard PPQN. */
|
||||
static Beats ticks(int32_t ticks) {
|
||||
return Beats(0, ticks);
|
||||
static Beats ticks(int64_t ticks) {
|
||||
assert (ticks/PPQN < std::numeric_limits<int32_t>::max());
|
||||
return Beats (ticks / PPQN, ticks % PPQN);
|
||||
}
|
||||
|
||||
/** Create from ticks at a given rate.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue