mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 05:35:47 +01:00
Fix region-fade, time-stretch and other scaling operations (#9057)
This resolves an ambiguity between abs(int) and std::abs(T) which depends on context and compiler version and optimization. In context of #9057, (gcc-6.3 -O3) math.h `abs(int)` was used. This truncated the superclock value to 31 bit in ControlList::extend_to.
This commit is contained in:
parent
117cfc844b
commit
6407ca51cd
1 changed files with 2 additions and 2 deletions
|
|
@ -67,8 +67,8 @@ class _ratio_t {
|
|||
public:
|
||||
/* do not allow negative values, this is just a ratio */
|
||||
|
||||
_ratio_t (T n, T d) : _numerator (abs (n)), _denominator (abs(d)) { assert (_denominator != 0); }
|
||||
_ratio_t (T n) : _numerator (abs (n)), _denominator (1) {}
|
||||
_ratio_t (T n, T d) : _numerator (std::abs (n)), _denominator (std::abs(d)) { assert (_denominator != 0); }
|
||||
_ratio_t (T n) : _numerator (std::abs (n)), _denominator (1) {}
|
||||
|
||||
T numerator() const { return _numerator; }
|
||||
T denominator() const { return _denominator; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue